Skip to content
Greg Walker edited this page Jul 15, 2022 · 5 revisions

Charlie developer documentation > Dates

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.

getNextHoliday(String timesone) : Object

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"
}
Clone this wiki locally