Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
UNSTABLE: Utilities for dealing with Date objects
Functions
Returns the number of the day in the year in the local time zone.
Returns the number of the day in the year in UTC time.
Calculates the difference of the 2 given dates in various units. If the units are omitted, it returns the difference in the all available units.
Formats a date to a string with the specified format.
Returns whether the given year is a leap year in UTC time. This always returns the same value regardless of the local timezone.
Parses a date string using the specified format string.
Returns the ISO week number of the provided date (1-53).
Interfaces
Type Aliases
Return type for difference.
Options for difference.
- units: Unit[]
Units to calculate difference in. Defaults to all units.
| "seconds"
| "minutes"
| "hours"
| "days"
| "weeks"
| "months"
| "quarters"
| "years"
Duration units for DifferenceFormat and
DifferenceOptions.
Variables
The month index for April.
The month index for August.
The number of milliseconds in a day.
The month index for December.
The month index for February.
The day of week index for Friday.
The number of milliseconds in an hour.
The month index for January.
The month index for July.
The month index for June.
The month index for March.
The month index for May.
The number of milliseconds in a minute.
The day of week index for Monday.
The month index for November.
The month index for October.
The day of week index for Saturday.
The number of milliseconds in a second.
The month index for September.
The day of week index for Sunday.
The day of week index for Thursday.
The day of week index for Tuesday.
The day of week index for Wednesday.
The number of milliseconds in a week.