Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
nordic-holidays
Advanced tools
This library provides functions to check and retrieve public holidays for Sweden (SE), Denmark (DK), and Norway (NO). It supports both fixed and moveable holidays, including those based on Easter.
This library provides functions to check and retrieve public holidays for Sweden (SE), Denmark (DK), and Norway (NO). It supports both fixed and moveable holidays, including those based on Easter.
To use this library in your project, first install it via npm:
npm install nordic-holidays
https://www.npmjs.com/package/nordic-holidays
const { checkHoliday, getHolidays } = require("nordic-holidays");
or
import { checkHoliday, getHolidays } from "nordic-holidays";
const date = '2024-12-25' or new Date('2024-12-25')
const countryCode = 'se' or 'dk' or 'no'
const language = 'english' or default 'local'
const holidayName = checkHoliday(date, countryCode, language) // Returns: "Juldagen"
const invalidHolidayDate = checkHoliday('2024-12-03', 'se') // Returns empty string: ""
const year = 2024
const holidays = getHolidays(year, countryCode, language) // Returns the following object:
{
"New Year's Day": '2024-01-01',
'Christmas Eve': '2024-12-24',
'Christmas Day': '2024-12-25',
'Second Day of Christmas': '2024-12-26',
"New Year's Eve": '2024-12-31',
"International Workers' Day": '2024-05-01',
Epiphany: '2024-01-06',
'National Day of Sweden': '2024-06-06',
'Good Friday': '2024-03-29',
'Easter Sunday': '2024-03-31',
'Easter Monday': '2024-04-01',
'Ascension Day': '2024-05-09',
Pentecost: '2024-05-19',
"All Saints' Day": '2024-11-02',
"Midsummer's Day": '2024-06-22'
}
checkHoliday(date: string | Date, country: "se" | "dk" | "no", language: 'english' | 'local'): string
getHolidays(year: number, country: "se" | "dk" | "no", language: 'english' | 'local'): string[]
FAQs
This library provides functions to check and retrieve public holidays for Sweden (SE), Denmark (DK), and Norway (NO). It supports both fixed and moveable holidays, including those based on Easter.
We found that nordic-holidays demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.