The calendar to use for formatting
The time components to format
Formatting options
OptionalfromComponents?: TimeComponentsThe reference time to measure from (default: the current world time)
OptionalmaxTerms?: numberThe maximum number of time components to include (default: 0, all)
Optionalshort?: booleanWhether to use short format (default: false)
The formatted timestamp
The output will describe the time either in the future or in the past. for future as "{years}, {days}, {hours}, {minutes}, {seconds} in the future" for past as "{years}, {days}, {hours}, {minutes}, {seconds} ago". Components with a zero value are omitted from the output. If the time is the current time, "now" is returned.
Format time components relative to the current time.