Skip to content

Interface: CalendarSystem ​

Experimental

A non-Gregorian calendar used to interpret the date part of date strings (the xcalendar, ycalendar, … attributes; world calendars are plan E3).

Only the year/month/day → day-number mapping differs between calendars; time of day and UTC offsets are handled by parseDate itself, so an implementation stays tiny.

Methods ​

toEpochDay() ​

ts
toEpochDay(
   year,
   month,
   day
): number | undefined;

Experimental

Days since 1970-01-01 (Gregorian, UTC) of the given calendar date, or undefined if the date does not exist in this calendar.

Parameters ​

ParameterType
yearnumber
monthnumber
daynumber

Returns ​

number | undefined

Released under the MIT License.