2.0.14 • Published 2 months ago

holidays-jp v2.0.14

Weekly downloads
4
License
MIT
Repository
github
Last release
2 months ago

holidays-jp.js

test npm version Try holidays-jp on RunKit

get Japanese public holidays

Installation

npm

$ npm install holidays-jp

yarn

$ yarn add holidays-jp

Usage

const holidays = require('holidays-jp');

Example

const date = new Date(2019, 1 - 1, 1, 0, 0, 0, 0);

holidays.isHoliday(date); // => true
const 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 $?
1

use current time if don't pass argument:

$ date +%FT%T
2019-08-25T03:09:59
$ npx holidays-jp
$ echo $?
1

Related

License

The MIT license.

2.0.14

2 months ago

2.0.13

2 months ago

2.0.12

3 months ago

2.0.11

3 months ago

2.0.10

4 months ago

2.0.9

4 months ago

2.0.7

6 months ago

2.0.8

6 months ago

2.0.5

8 months ago

2.0.4

8 months ago

2.0.6

7 months ago

2.0.3

9 months ago

2.0.2

10 months ago

2.0.1

10 months ago

2.0.0

1 year ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.2

4 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago