lucee.Component
mura.moment
| Constructor Summary | |
|---|---|
|
init([any time='[runtime expression]'], [any zone='[runtime expression]'])
|
|
| Method Summary | |
|---|---|
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. |
private any
|
getSystemTimeMS()
|
string
|
getSystemTZ()
|
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. |
private any
|
getTZ([any id])
|
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. |
private any
|
TZtoUTC([any time], [any tz='[runtime expression]'])
|
any
|
utc()
convert datetime to utc zone. |
private any
|
UTCtoTZ(any time, string tz)
|
any
|
year([any newYear=''])
|
| Methods inherited from class lucee.Component |
|---|
| None |
| Constructor Detail |
|---|
timezone| Method Detail |
|---|
amountpartpartmethodreturns a new instance with the same time & zone
newDayget the difference between the current date and the specified date
bpartpartreturns the number of milliseconds since 1/1/1970 (local). Call .utc() first to get utc epoch
return datetime formatted with specified mask (dateTimeFormat mask rules)
maskreturns fuzzy-date string e.g. 2 hours ago
comparereturns what the offset was at that specific moment
timezonedatePartreturn raw datetime object in current zone
returns the offset in seconds (considering DST) of the current moment
used to calculate what the custom offset should be, based on current target and new target
sourceTZdestTZtimeidreturn the current zone
returns the offset in seconds (considering DST) of the specified zone
zonenewHourcomparepartcomparepartacpartcomparepartreturns whichever moment came last
abreturns whichever moment came first
abnewMinutenewMonthoffsetnewSecondpartamountpartconvert datetime to specified zone
zonetimetzconvert datetime to utc zone
timetznewYear