Socket
Socket
Sign inDemoInstall

german-holiday

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    german-holiday

Check whether a date is a german holiday


Version published
Weekly downloads
18
increased by38.46%
Maintainers
1
Install size
21.0 kB
Created
Weekly downloads
 

Readme

Source

german-holiday for NodeJS

This Module accepts a JS date object and returns state-specific either the name of a holiday or false. It could be helpful in calendar- or schedulingapplications.

Installation

Installation of german-holiday is as easy as every other NPM-package.

$ npm install german-holiday

##Usage Call the holidayCheck function and pass two arguments.

  • First argument: A JavaScript Date Object.
  • Second argument: The short form of a german state as string.

Possible short forms:

shortstate
BWBaden-Württemberg
BYBayern
BEBerlin
BBBrandenburg
HBBremen
HHHamburg
HEHessen
MVMecklenburg-Vorpommern
NINiedersachsen
NWNordrhein-Westfalen
RPRheinland-Pfalz
SLSaarland
SNSachsen
STSachsen-Anhalt
SHSchleswig-Holstein
THThüringen

##Examples Input:

var hcheck = require("german-holiday")
console.log(hcheck.holidayCheck(new Date(2015, 11, 25), "NW"))

Output:

'1. Weihnachtstag'

Input:

var hcheck = require("german-holiday")
console.log(hcheck.holidayCheck(new Date(2015, 11, 27), "BB"))

Output:

false

Keywords

FAQs

Last updated on 26 Jan 2016

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