This library is based on moment.js; and now have the following client actions with localization in many languages.
momentAdd
input: referenceDateTime, Unit, Value
output: DateTime
Returns the original moment by adding Value by Unit.This is a pretty robust function for adding time to an existing moment. To add time, pass the key of what time you want to add, and the amount you want to add. For example MonmentAdd( CurrDateTime() 'year', 10) returns today + 10 years.
momentCalendar
input: referenceDate, Locale
output: Text
Will format a date with different strings depending on how close to referenceDate (today by default) the date is.
momentDiff
input: referenceDateTime1, referenceDateTime1, Unit, WithFractions, Value
referenceDateTime1,
output: Integer
Returns the Duration in Unit (year, month, week, day) between referenceDateTime1 and referenceDateTime2
momentEndOf
input: referenceDateTime, Unit
Returns the EndOf a given period (unit, (year, quarter, month, week, day).
momentFormat
input: referenceDateTime, Format, Locale
Returns the referenceDateTime in given Format and Locale, for example
MomentFormat(#2019-06-04 01:42#, "LLLL", "de") returns 'Freitag, 24. Juni 2016 01:42'
Go to the Moment JS website for the full description of the format / parsing a string with localization.
momentStartOf
DateTime
Returns the StartOf a given period (unit, (year, quarter, month, week, day).
momentSubstract
Returns the original moment by substracting Value by Unit.This is a pretty robust function for adding time to an existing moment. To add time, pass the key of what time you want to add, and the amount you want to add. For example MonmentAdd( CurrDateTime() 'year', 10) returns today - 10 years.
momentWeekDay_Date
input: referenceDateTime, daynumber, locale
output: Value
This method can be used to get the date for the daynumber week of referenceDateTime
momentWeekDay_Number
input: referenceDateTime, locale
This method can be used to get the day of the week, with Sunday as 0 and Saturday as 6.
For full documentation of this javascript library go to the project website https://momentjs.com