1.0.5 • Published 3 years ago

shamsi-holidays v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

shamsi-holidays

Holidays in Iran calender

NPM version

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

shamsi-holidays provides dates of holidays for Iran, check the any specific date is holiday or not based on online request or static data.

NOTE: Input Format IS IMPORTANT

Get all Holidays

Online request

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

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

Static data (offline)

There are dates of holidays for 1400-1406

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

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

Check status of date

Online request

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()

Static data (offline)

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

Online request

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()
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago