Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

get Japanese public holidays

License

NotificationsYou must be signed in to change notification settings

sasaplus1/holidays-jp.js

Repository files navigation

testnpm versionTry holidays-jp on RunKit

get Japanese public holidays

Installation

npm

$npm install holidays-jp

yarn

$yarn add holidays-jp

Usage

constholidays=require('holidays-jp');

Example

constdate=newDate(2019,1-1,1,0,0,0,0);holidays.isHoliday(date);// => true
constdate=newDate(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%T2019-08-25T03:09:59$npx holidays-jp$echo$?1

Related

License

The MIT license.

About

get Japanese public holidays

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp