API Reference Dayoff v#0.1.0

Copy Markdown View Source

Modules

Public holidays for 200+ countries, states and regions, offline.

The revised Bengali calendar as date-bengali-revised implements it: the year starts on April 14th, months have 31 days for the first five and 30 for the rest, and the eleventh month gets a 31st day when the Gregorian year it falls in is a leap year.

Easter Sunday in the Gregorian and the Julian (Orthodox) computus, the Gauss algorithm as the reference implementation's date-easter has it.

The Jalaali (Persian) calendar, the arithmetic algorithm of jalaali-js (Behrooz Khosravi, after Borkowski) which the reference implementation uses. Valid for Jalaali years -61 to 3177.

Proleptic Julian calendar dates as Gregorian Dates, for rules like julian 12-25 (Orthodox Christmas).

The calendars that ship as lookup tables generated by mix dayoff.sync: Hijri and Hebrew (from the reference parser's own tables), the Chinese, Korean and Vietnamese lunisolar calendars with their solar terms, and the equinox and solstice dates. Each file is decoded once into :persistent_term.

Access to the holiday dataset in priv/data/holidays.json.

One holiday occurrence.

Turns a rule string like "4th thursday in November" or "substitutes 12-25 if saturday then previous friday" into tokens.