README.md

ritsu-holidays

The public holidays of the United States, the United Kingdom and Japan, as calendars of koyomi, for a module of ritsu to use. Each calendar closes the holidays and nothing else. Which other days a business is closed (Saturdays and Sundays, the days between Christmas and the New Year) is for the calendar that uses it to say.

FileCalendarHolidaysKnown from the data
us/federal_holidays.calfederal_holidaysThe federal holidays of the United States, on the days an employee who works Monday to Friday has them2021-01-01 to 2030-12-31
uk/england_and_wales.calengland_and_walesThe bank holidays of England and Wales2019-01-01 to 2028-12-31
uk/scotland.calscotlandThe bank holidays of Scotland2019-01-01 to 2028-12-31
uk/northern_ireland.calnorthern_irelandThe bank holidays of Northern Ireland2019-01-01 to 2028-12-31
japan/national_holidays.calnational_holidaysThe national holidays of Japan and the other days off under the Act on National Holidays1955-01-01 to 2027-12-31
japan/国民の祝日.cal国民の祝日The same, in Japanese1955-01-01 to 2027-12-31

The calendars of the United States and the United Kingdom have no offset: they have daylight saving time, so they give dates only. The calendars of Japan have the offset +09:00. Whether a day outside the range its data knows is a holiday is not known, and koyomi says so rather than guessing.

Use

Require the module, and the line that checks its signature:

$ ritsu mod add holidays ghcr.io/i2y/ritsu-holidays@1.1.0
require holidays oci "ghcr.io/i2y/ritsu-holidays" 1.1.0
signature "ghcr.io/i2y/ritsu-holidays" by matching "^https://github[.]com/i2y/ritsu/" issuer "https://token.actions.githubusercontent.com"

Then read a calendar from your own, and close what your business closes on top of it:

calendar office v1
description "The office in London: closed on Saturdays, Sundays and the bank holidays of England and Wales"
use calendar "@holidays/uk/england_and_wales.cal"

closed weekly sat, sun

Data

Each calendar pins its data file by its SHA-256. THIRD_PARTY_NOTICES.md says where each was taken from, when, and under which terms. The files of the United Kingdom and Japan are, byte for byte, the files their publishers serve.

The calendar files are under the MIT License or the Apache License, version 2.0, at your option, as ritsu is.

Versions

A version that takes in a new year's holidays raises the minor version. A version that renames a file or removes one raises the major version.