Calendar


The calendar vocabulary defines two data types and a set of operations on them:
timestamp

duration


Durations represent spans of time:
Using durations

Arithmetic on timestamps and durations:
Timestamp arithmetic

Getting the current timestamp:
now ( -- timestamp )

gmt ( timestamp -- timestamp )


Time zones:
>local-time ( timestamp -- timestamp' )

>gmt ( timestamp -- timestamp' )

>utc ( timestamp -- timestamp' )

convert-timezone ( timestamp duration -- timestamp )


Timestamps relative to each other:
Relative timestamps

Operations on units of time:
Year operations
Month names in English
Day names in English

Both timestamp s and duration s implement the Linear order protocol.

Metadata about the calendar:
Calendar facts