
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@sl-code-lords/holidays
Advanced tools
generate holidays in a specific year using JavaScript
generate holidays in a specific year using JavaScript
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes
yarn add @sl-code-lords/holidays
or
npm i @sl-code-lords/holidays
const Holidays = require('@sl-code-lords/holidays')
const country_list = require('@sl-code-lords/holidays/lib/country_list')
const api = new Holidays(2023)
var holidays = await api.sri_lanka()
console.log(holidays)
{
January: [
{
date: '06',
Day: 'Friday',
Holiday_Name: 'Duruthu Full Moon Poya',
Type: 'National Holiday',
Comments: ''
},
{
date: '15',
Day: 'Sunday',
Holiday_Name: 'Tamil Thai Pongal Day',
Type: 'National Holiday',
Comments: ''
},
{
date: '16',
Day: 'Monday',
Holiday_Name: 'Special Bank Holiday Holiday',
Type: 'Not A Public Holiday',
Comments: 'Banks'
}
],
February: [
{
date: '04',
Day: 'Saturday',
Holiday_Name: 'National Day',
Type: 'National Holiday',
Comments: ''
},
{
date: '05',
Day: 'Sunday',
Holiday_Name: 'Navam Full Moon Poya',
Type: 'National Holiday',
Comments: ''
},
{
date: '18',
Day: 'Saturday',
Holiday_Name: 'Mahasivarathri Day',
Type: 'National Holiday',
Comments: ''
}
],
March: [
{
date: '06',
Day: 'Monday',
Holiday_Name: 'Madin Full Moon Poya',
Type: 'National Holiday',
Comments: ''
}
],
April: [
{
date: '05',
Day: 'Wednesday',
Holiday_Name: 'Bak Full Moon Poya',
Type: 'National Holiday',
Comments: ''
},
{
date: '07',
Day: 'Friday',
Holiday_Name: 'Good Friday',
Type: 'National Holiday',
Comments: ''
},
{
date: '13',
Day: 'Thursday',
Holiday_Name: 'Sinhala and Tamil New Year Eve',
Type: 'National Holiday',
Comments: 'Puthandu'
},
{
date: '14',
Day: 'Friday',
Holiday_Name: 'Sinhala and Tamil New Year',
Type: 'National Holiday',
Comments: 'Puthandu'
},
{
date: '22',
Day: 'Saturday',
Holiday_Name: 'Id-Ul-Fitr',
Type: 'National Holiday',
Comments: 'Ramazan Festival Day'
}
],
May: [
{
date: '01',
Day: 'Monday',
Holiday_Name: 'Labour Day',
Type: 'National Holiday',
Comments: "International Workers' Day"
},
{
date: '05',
Day: 'Friday',
Holiday_Name: 'Vesak Full Moon Poya',
Type: 'National Holiday',
Comments: 'Birth of Buddha'
},
{
date: '06',
Day: 'Saturday',
Holiday_Name: 'Vesak Full Moon Poya Holiday',
Type: 'National Holiday',
Comments: ''
}
],
June: [
{
date: '03',
Day: 'Saturday',
Holiday_Name: 'Poson Full Moon Poya',
Type: 'National Holiday',
Comments: ''
},
{
date: '29',
Day: 'Thursday',
Holiday_Name: 'Idul Adha',
Type: 'National Holiday',
Comments: 'Hajjhi Festival Day'
},
{
date: '30',
Day: 'Friday',
Holiday_Name: 'Special Bank Holiday',
Type: 'Not A Public Holiday',
Comments: 'Banks'
}
],
July: [
{
date: '03',
Day: 'Monday',
Holiday_Name: 'Esala Full Moon Poya',
Type: 'National Holiday',
Comments: ''
}
],
August: [
{
date: '01',
Day: 'Tuesday',
Holiday_Name: 'Nikini Full Moon Poya',
Type: 'National Holiday',
Comments: ''
},
{
date: '30',
Day: 'Wednesday',
Holiday_Name: 'Adhi Nikini Full Moon Poya',
Type: 'National Holiday',
Comments: 'Second full moon in August'
}
],
September: [
{
date: '28',
Day: 'Thursday',
Holiday_Name: 'Milad-Un-Nabi',
Type: 'National Holiday',
Comments: 'Birthday of Prophet Muhammad'
},
{
date: '29',
Day: 'Friday',
Holiday_Name: 'Binara Full Moon Poya',
Type: 'National Holiday',
Comments: ''
}
],
October: [
{
date: '28',
Day: 'Saturday',
Holiday_Name: 'Vap Full Moon Poya',
Type: 'National Holiday',
Comments: ''
}
],
November: [
{
date: '12',
Day: 'Sunday',
Holiday_Name: 'Deepavali Festival Day',
Type: 'National Holiday',
Comments: 'Dewali'
},
{
date: '26',
Day: 'Sunday',
Holiday_Name: 'Ill Full Moon Poya',
Type: 'National Holiday',
Comments: ''
}
],
December: [
{
date: '25',
Day: 'Monday',
Holiday_Name: 'Christmas Day',
Type: 'National Holiday',
Comments: ''
},
{
date: '26',
Day: 'Tuesday',
Holiday_Name: 'Unduvap Full Moon Poya',
Type: 'National Holiday',
Comments: ''
}
]
}
See also the list of contributors who participated in this project.
FAQs
generate holidays in a specific year using JavaScript
We found that @sl-code-lords/holidays demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.