-
Notifications
You must be signed in to change notification settings - Fork 21
Dates
Greg Walker edited this page Nov 7, 2022
·
5 revisions
The dates utility is meant to provide date parsing and formatting functionality. It exists primarily as a placeholder for when Moment.js is removed and replaced with the Temporal API. For now, it only provides a single method.
Gets the next federal Election Day date from the current date. Federal Election Day is defined as the first Tuesday after the first Monday of November in even-numbered years.
Returns
A moment object representing the next federal Election Day at midnight UTC.
Gets the next holiday after the current date.
Arguments | Description |
---|---|
timezone |
The timezone to use for fetching the next holiday. Default: America/New_York , US Eastern timezone |
Returns
- An object representing the next holiday:
{
"name": "holiday official name",
"alsoObservedAs": "common name if different, or undefined",
"date": "moment object representing the date of the holiday in the requested timezone"
}
Charlie developer documentation