mura

Class moment

WEB-INF.cftags.component
    extended by mura.moment
Class Attributes:
  • displayname : moment
  •  
    Constructor Summary
    init([any time='[runtime expression]'], [any zone='[runtime expression]'])
    Method Summary
    private any TZtoUTC([any time], [any tz='[runtime expression]'])
    private any UTCtoTZ(any time, string tz)
    any add(numeric amount, string part)
    private any canonicalizeDatePart([any part], [any method='dateAdd'])
    moment clone()
         returns a new instance with the same time & zone.
    any day([any newDay=''])
    numeric diff(moment b, [any part='seconds'])
         get the difference between the current date and the specified date.
    any endOf(string part)
    any epoch()
         returns the number of milliseconds since 1/1/1970 (local).
    any format(string mask)
         return datetime formatted with specified mask (dateTimeFormat mask rules).
    any from(moment compare)
         returns fuzzy-date string e.
    any fromNow()
    any getArbitraryTimeOffset(any time, string zone)
         returns what the offset was at that specific moment.
    private any getDatePart([any datePart])
    any getDateTime()
         return raw datetime object in current zone.
    numeric getOffset()
         returns the offset in seconds (considering DST) of the current moment.
    string getSystemTZ()
    private any getSystemTimeMS()
    private any getTZ([any id])
    private any getTargetOffsetDiff([any sourceTZ], [any destTZ], [any time])
         used to calculate what the custom offset should be, based on current target and new target.
    string getZone()
         return the current zone.
    any getZoneCurrentOffset(string zone)
         returns the offset in seconds (considering DST) of the specified zone.
    struct getZoneTable()
    any hour([any newHour=''])
    boolean isAfter(moment compare, [any part='seconds'])
    boolean isBefore(moment compare, [any part='seconds'])
    boolean isBetween(moment a, moment c, [any part='seconds'])
    boolean isDST()
    boolean isSame(moment compare, [any part='seconds'])
    moment max(moment a, moment b)
         returns whichever moment came last.
    moment min(moment a, moment b)
         returns whichever moment came first.
    any minute([any newMinute=''])
    any month([any newMonth=''])
    private any readableOffset([any offset])
    any second([any newSecond=''])
    any startOf(string part)
    any subtract(numeric amount, string part)
    any tz(string zone)
         convert datetime to specified zone.
    any utc()
         convert datetime to utc zone.
    any year([any newYear=''])
     
    Methods inherited from class WEB-INF.cftags.component
    None

    Constructor Detail

    init

    public init([any time='[runtime expression]'], [any zone='[runtime expression]'])

    Parameters:
    time
    zone

    Method Detail

    TZtoUTC

    private any TZtoUTC([any time], [any tz='[runtime expression]'])

    Parameters:
    time
    tz

    UTCtoTZ

    private any UTCtoTZ(any time, string tz)

    Parameters:
    time
    tz

    add

    public any add(numeric amount, string part)

    Parameters:
    amount
    part

    canonicalizeDatePart

    private any canonicalizeDatePart([any part], [any method='dateAdd'])

    Parameters:
    part
    method

    clone

    public moment clone()

    returns a new instance with the same time & zone


    day

    public any day([any newDay=''])

    Parameters:
    newDay

    diff

    public numeric diff(moment b, [any part='seconds'])

    get the difference between the current date and the specified date

    Parameters:
    b
    part

    endOf

    public any endOf(string part)

    Parameters:
    part

    epoch

    public any epoch()

    returns the number of milliseconds since 1/1/1970 (local). Call .utc() first to get utc epoch


    format

    public any format(string mask)

    return datetime formatted with specified mask (dateTimeFormat mask rules)

    Parameters:
    mask

    from

    public any from(moment compare)

    returns fuzzy-date string e.g. 2 hours ago

    Parameters:
    compare

    fromNow

    public any fromNow()


    getArbitraryTimeOffset

    public any getArbitraryTimeOffset(any time, string zone)

    returns what the offset was at that specific moment

    Parameters:
    time
    zone

    getDatePart

    private any getDatePart([any datePart])

    Parameters:
    datePart

    getDateTime

    public any getDateTime()

    return raw datetime object in current zone


    getOffset

    public numeric getOffset()

    returns the offset in seconds (considering DST) of the current moment


    getSystemTZ

    public string getSystemTZ()


    getSystemTimeMS

    private any getSystemTimeMS()


    getTZ

    private any getTZ([any id])

    Parameters:
    id

    getTargetOffsetDiff

    private any getTargetOffsetDiff([any sourceTZ], [any destTZ], [any time])

    used to calculate what the custom offset should be, based on current target and new target

    Parameters:
    sourceTZ
    destTZ
    time

    getZone

    public string getZone()

    return the current zone


    getZoneCurrentOffset

    public any getZoneCurrentOffset(string zone)

    returns the offset in seconds (considering DST) of the specified zone

    Parameters:
    zone

    getZoneTable

    public struct getZoneTable()


    hour

    public any hour([any newHour=''])

    Parameters:
    newHour

    isAfter

    public boolean isAfter(moment compare, [any part='seconds'])

    Parameters:
    compare
    part

    isBefore

    public boolean isBefore(moment compare, [any part='seconds'])

    Parameters:
    compare
    part

    isBetween

    public boolean isBetween(moment a, moment c, [any part='seconds'])

    Parameters:
    a
    c
    part

    isDST

    public boolean isDST()


    isSame

    public boolean isSame(moment compare, [any part='seconds'])

    Parameters:
    compare
    part

    max

    public moment max(moment a, moment b)

    returns whichever moment came last

    Parameters:
    a
    b

    min

    public moment min(moment a, moment b)

    returns whichever moment came first

    Parameters:
    a
    b

    minute

    public any minute([any newMinute=''])

    Parameters:
    newMinute

    month

    public any month([any newMonth=''])

    Parameters:
    newMonth

    readableOffset

    private any readableOffset([any offset])

    Parameters:
    offset

    second

    public any second([any newSecond=''])

    Parameters:
    newSecond

    startOf

    public any startOf(string part)

    Parameters:
    part

    subtract

    public any subtract(numeric amount, string part)

    Parameters:
    amount
    part

    tz

    public any tz(string zone)

    convert datetime to specified zone

    Parameters:
    zone

    utc

    public any utc()

    convert datetime to utc zone


    year

    public any year([any newYear=''])

    Parameters:
    newYear