Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@holiday-jp/holiday_jp

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@holiday-jp/holiday_jp

Japanese holidays

  • 2.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
26K
increased by18.81%
Maintainers
2
Weekly downloads
 
Created
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

Package last updated on 01 Aug 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc