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

shamsi-holidays

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shamsi-holidays

This module provides dates of holidays for Iran

  • 0.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

shamsi-holidays

Holidays in Iran calender

NPM version

You can get all dates of Holidays beasd on www.time.ir

This module provides dates of holidays for Iran, check the any specific date is holiday or not beased on online.

Get all Holidays in a specific year

const { getHolidaysYearOnline } = require('shamsi-holidays');

async function holiday() {
    const result = await getHolidaysYearOnline('1400');
    console.log(result);
}
holiday()

Get all Holidays in a specific year based on offline

There are dates of holidays for 1400-1405

const { getHolidays } = require('shamsi-holidays');

async function holiday() {
    const result = await getHolidays('1400');
    console.log(result);
}
holiday()

Check status of Date based on online and send a request to time.ir

const { isHolidaysOnline } = require('shamsi-holidays');

// date format = jYYYY/jMM/jDD | 1400/01/02

const date = '1400/01/02'
async function holiday() {
    const result = await isHolidaysOnline(date);
    console.log(result);
}
holiday()

Check status of Date based on offline without any request to time.ir

const { isHoliday } = require('shamsi-holidays');

// date format = jYYYY/jMM/jDD | 1400/01/02

const date = '1400/01/02'
async function holiday() {
    const result = await isHoliday(date);
    console.log(result);
}
holiday()

Get all Holidays in specific month of year

const { getHolidaysYearAndMonthOnline } = require('shamsi-holidays');

// month should be = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];

async function holiday() {
    const result = await getHolidaysYearAndMonthOnline('1400','1');
    console.log(result);
}
holiday()

Get all Holidays in specific months of year

const { getHolidaysYearAndMonthsOnline } = require('shamsi-holidays');

// month should be = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];

async function holiday() {
    const result = await getHolidaysYearAndMonthsOnline('1400', ['1',12'] );
    console.log(result);
}
holiday()

Keywords

FAQs

Package last updated on 17 Oct 2021

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