
Security News
Rspack Introduces Rslint, a TypeScript-First Linter Written in Go
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
Holiday is a gem that lets you configure holidays for multiple countries with YAML.
First setup path to a YAML file and set the country code.
Holiday.yaml_file = "/path/to/yaml/holiday.yml"
Holiday.country = "US"
You can query for dates
# Defaults to current year
Holiday.find("christmas")
Holiday.find("labour day")
Or supply a year
# Can supply the year as optional argument
Holiday.find(:christmas, 2005)
Holiday.find(:thanksgiving, 1999)
The YAML format for Holiday is as follows
holiday:
US:
christmas:
when: december 25th
as: christmas
halloween:
when: october 31st
as: halloween, all hallows eve
labor_day:
when: 1st monday in september
as: labor day, labour day
thanksgiving:
when: 4th thursday in november
as: thanksgiving, turkey day
Holidays are scoped by country code. Each holiday needs both "when" and "as" keys. The "when" key can either be an exact month and day, or the occurrence of the holiday in the given month. E.g., "1st monday in september".
The "as" key is used to identify holidays by alternate names and spellings. For instance, "thanksgiving" and "turkey day" should both point to the 4th thursday in november.
Holiday.find("turkey day")
Holiday.find(:thanksgiving)
There are a few other methods that may be useful
Holiday.all # array containing all keys and alternate names of holidays from yaml file
Holiday.scan("a string containing a holiday by name, like christmas") # => christmas
Holiday::Query.find("all hallows eve") # => october 31st
FAQs
Unknown package
We found that holiday demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.