Language docs

Time library

Reference for UTC calendar conversion and formatting words exported by the top-level `time` module.

This page lists the public words currently defined in the top-level time library module.

utc.ffp

Source: ff/lib/time/utc.ffp
Import: .import <time/utc>

WordStack effectDescription
leap-year?year -- flagTests whether a Gregorian year is a leap year.
days/yearyear -- daysReturns the number of days in a year.
days/monthyear month -- daysReturns the number of days in a month for a given year.
sod>hmssod -- hour minute secondConverts seconds-of-day into hour, minute, and second fields.
days>ymddays -- year month dayConverts days since the Unix epoch into a UTC date.
epoch>utcepoch -- year month day hour minute secondConverts non-negative Unix epoch seconds into UTC fields.
utc>iso8601year month day hour minute second -- {prints YYYY-MM-DDTHH:MM:SSZ}Prints UTC fields as an ISO 8601 timestamp.
epoch>iso8601epoch -- {prints UTC ISO-8601 string}Converts an epoch timestamp and prints it as ISO 8601 UTC.