holidays-jp
v2.0.61
Published
get Japanese public holidays
Readme
holidays-jp.js
get Japanese public holidays
Installation
npm
$ npm install holidays-jpyarn
$ yarn add holidays-jpUsage
const holidays = require('holidays-jp');Example
const date = new Date(2019, 1 - 1, 1, 0, 0, 0, 0);
holidays.isHoliday(date); // => trueconst date = new Date(2019, 1 - 1, 1, 0, 0, 0, 0);
holidays.getHolidayInfo(date); // => { date: '2019-01-01', name: '元日', ... }CLI
holidays-jp.js has CLI command:
$ npx holidays-jp '2019-01-01T00:00:00+09:00'
$ echo $?
0$ npx holidays-jp '2019-01-02T00:00:00+09:00'
$ echo $?
1use current time if don't pass argument:
$ date +%FT%T
2019-08-25T03:09:59
$ npx holidays-jp
$ echo $?
1Related
License
The MIT license.
