Socket
Socket
Sign inDemoInstall

@holiday-jp/holiday_jp

Package Overview
Dependencies
0
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @holiday-jp/holiday_jp

Japanese holidays


Version published
Weekly downloads
14K
decreased by-1.28%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

holiday_jp JavaScript test

Get holidays in Japan.

Install

$ npm install @holiday-jp/holiday_jp

Usage

In HTML

<script src="./your/own/path/holiday_jp.js"></script>
<script>
var holidays = holiday_jp.between(new Date('2010-09-14'), new Date('2010-09-21'));
console.log(holidays[0]['name']); // 敬老の日
</script>

In Node

var holiday_jp = require('@holiday-jp/holiday_jp');
var holidays = holiday_jp.between(new Date('2010-09-14'), new Date('2010-09-21'));
console.log(holidays[0]['name']); // 敬老の日

If you want to use specific years only

var holiday_jp = require('@holiday-jp/holiday_jp/lib/no_autoload_holidays');
var holidays_2010 = require('@holiday-jp/holiday_jp/lib/holidays_every_year/2010');
var holidays_2011 = require('@holiday-jp/holiday_jp/lib/holidays_every_year/2011');
holiday_jp.setHolidays([holidays_2010, holidays_2011]);

var holidays = holiday_jp.between(new Date('2010-09-14'), new Date('2010-09-21'));
console.log(holidays[0]['name']); // 敬老の日

In TypeScript

import * as holiday_jp from '@holiday-jp/holiday_jp';
const holidays = holiday_jp.between(new Date('2010-09-14'), new Date('2010-09-21'));
console.log(holidays[0]['name']); // 敬老の日

Keywords

FAQs

Last updated on 01 Aug 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc