->TSELEMENTS


date time
Since v1.2.0
Available on all platforms
See also

Configuration parameters


The ->TSELEMENTS function consumes an optional STRING timezone and a LONG timestamp and pushes back information on the day and time it represents as a LIST of LONG:

[
    year
    month
    day_of_month
    hours
    minutes
    seconds
    subseconds_in_platform_unit
    day_of_year
    day_of_week
    week_of_year
  ]

The indexing is the following: month, day_of_month, day_of_year, day_of_week and week_of_year use 1-indexing. For day_of_week, Monday has the value 1 and Sunday 7.

Depending on the platform time unit, the part representing subseconds can have 3, 6 or 9 digits respectively for milliseconds, microseconds or nanoseconds platform time unit.

Valid values for the timezone can be found on the Joda website in any of the three columns. If no timezone is specified the pushed back representation is UTC.

Signature

Examples

NOW ->TSELEMENTS 1234567891234567 ->TSELEMENTS 1234567891234567 'America/Los_Angeles' ->TSELEMENTS 1234567891234567 'Asia/Rangoon' ->TSELEMENTS NOW ->TSELEMENTS 'tsElements' STORE $tsElements 1 GET // Get month index 12 % 1 + // Find next month index (1-indexed!) 'nextMonth' STORE $tsElements $nextMonth 1 SET // Update the tsElements with next month index TSELEMENTS->