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

public-holidays

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

public-holidays

Public holidays by country. Readonly from google calendar.

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
755
increased by13.19%
Maintainers
1
Weekly downloads
 
Created
Source

public-holidays

Gets public holidays from google calendar.

Usage

import { getHolidays } from 'public-holidays';
// public holidays for US in English
const options = { country: 'us', lang: 'en' };

const holidays = await getHolidays(options);

API (v0.2)

formatCalendarUrl(country, lang): string

Format google calendar url by country and language.

getHolidays(options): Promise<Holiday[]>

Get public holidays by options.

options:
  • country (string) (required) - country 2 letters code: us, ru
  • lang (string) (required) - language 2 letters code: en, ru
  • start (Date) (optional) - start date
  • end (Date) (optional) - end date
  • timeout (number) (optional) - request timeout in ms
types:
type Holiday = {
    date: Date
    name: string
}
type Options = {
    country: string
    lang: string
    start?: Date
    end?: Date
    timeout?: number
}

Keywords

FAQs

Package last updated on 19 Jan 2019

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