{"id":13452214,"url":"https://github.com/gaui/fridagar-node","last_synced_at":"2026-01-21T20:47:02.883Z","repository":{"id":49713555,"uuid":"54805924","full_name":"gaui/fridagar-node","owner":"gaui","description":"Node module that returns Icelandic holidays and other special days","archived":false,"fork":false,"pushed_at":"2025-05-08T14:59:22.000Z","size":97,"stargazers_count":16,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-27T13:41:35.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gaui.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-27T00:37:13.000Z","updated_at":"2025-05-08T14:59:26.000Z","dependencies_parsed_at":"2024-02-02T16:52:15.315Z","dependency_job_id":"5742fceb-dbab-42a5-964c-23157789d841","html_url":"https://github.com/gaui/fridagar-node","commit_stats":{"total_commits":29,"total_committers":5,"mean_commits":5.8,"dds":0.4137931034482759,"last_synced_commit":"9d2f3ee3042958d3823d0ee03505e401c7fbc27e"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/gaui/fridagar-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaui%2Ffridagar-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaui%2Ffridagar-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaui%2Ffridagar-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaui%2Ffridagar-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gaui","download_url":"https://codeload.github.com/gaui/fridagar-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaui%2Ffridagar-node/sbom","scorecard":{"id":419664,"data":{"date":"2025-08-11","repo":{"name":"github.com/gaui/fridagar-node","commit":"6ac45d9a566b35ad1ca44e46adabf0e95b1e733d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-19T00:51:36.849Z","repository_id":49713555,"created_at":"2025-08-19T00:51:36.849Z","updated_at":"2025-08-19T00:51:36.849Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28642339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T18:04:35.752Z","status":"ssl_error","status_checked_at":"2026-01-21T18:03:55.054Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T07:01:17.122Z","updated_at":"2026-01-21T20:47:02.838Z","avatar_url":"https://github.com/gaui.png","language":"TypeScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Frídagar\n\nSmall, fast JavaScript/TypeScript library for looking up Icelandic public\nholidays, and resolving business days before/after a given day. It also\nprovides info about other commonly observed \"special\" days such as\n\"Bolludagur\", etc.\n\n\"Half day\" holidays (such as Christmas and New Year's Eve) are marked as\nsuch, and can be optionally treated as either \"work days\" or \"non-work days\",\ndepending on need.\n\nAll day names/descriptions are in Icelandic, but each day has a stable `key`\nprop that can be used when translating its name into other languages.\n\nAll returned dates are in the UTC timezone and set to midnight.\n\n```\nnpm install fridagar\n```\n\n**Contents:**\n\n\u003c!-- prettier-ignore-start --\u003e\n\n- [Methods](#methods)\n  - [`getHolidays`](#getholidays)\n  - [`getAllDays`](#getalldays)\n  - [`getAllDaysKeyed`](#getalldayskeyed)\n  - [`getOtherDays`](#getotherdays)\n  - [`isHoliday`](#isholiday)\n  - [`isSpecialDay`](#isspecialday)\n  - [`workdaysFromDate`](#workdaysfromdate)\n- [Supported Days](#supported-days)\n  - [Open Questions](#open-questions)\n    - [Which Days to Include?](#which-days-to-include)\n    - [Historical Accuracy](#historical-accuracy)\n- [Exported types](#exported-types)\n  - [type `Holiday`](#type-holiday)\n  - [type `SpecialDay`](#type-specialday)\n  - [type `DayKey`, `HolidayKey`, `SpecialDayKey`](#type-daykey-holidaykey-specialdaykey)\n- [Contributing](#contributing)\n- [Change Log](#change-log)\n- [Other Iceland-Themed Libraries](#other-iceland-themed-libraries)\n\n\u003c!-- prettier-ignore-end --\u003e\n\n---\n\n## Methods\n\n---\n\n### `getHolidays`\n\n**Syntax:** `getHolidays(year?: number, month?: number): Array\u003cHoliday\u003e`\n\nReturns all Icelandic public holidays and commonly celebrated \"special\" days\nfor a given year — optionally narrowed down to a single month.\n\n```ts\nimport { getHolidays } from \"fridagar\";\n\nconst holidays2018 = getHolidays(2018);\nconst holidaysInDecember2018 = getHolidays(2018, 12);\n\n// If year is omitted the current year is used\nconst holidaysThisYear = getHolidays();\nconst holidaysInDecemberThisYear = getHolidays(undefined, 12);\n```\n\n---\n\n### `getAllDays`\n\n**Syntax:**\n`getAlldays(year?: number, month?: number): Array\u003cHoliday | SpecialDay\u003e`\n\nReturns all official Icelandic public holidays (non-working days) for a\ngiven year — optionally narrowed down to a single month.\n\n```ts\nimport { getAllDays } from \"fridagar\";\n\nconst allDays2018 = getAllDays(2018);\nconst allDaysInDecember2018 = getAllDays(2018, 12);\n\n// If year is omitted the current year is used\nconst allDaysThisYear = getAllDays();\nconst allDaysInDecemberThisYear = getAllDays(undefined, 12);\n```\n\n---\n\n### `getAllDaysKeyed`\n\n**Syntax:**\n`getAllDaysKeyed(year?: number): Record\u003cDayKey, Holiday | SpecialDay\u003e`\n\nReturns a keyed object with Icelandic public holidays and commonly celebrated\n\"special\" days for a given year. (Defaults to the current year.)\n\n```ts\nimport type { Holiday, SpecialDay } from \"fridagar\";\nimport { getAllDaysKeyed } from \"fridagar\";\n\nconst allDays1995 = getAllDaysKeyed(1995);\n\n// Note that the days are correctly typed\nconst easter95: Holiday = allDays1995.paska;\nconst ashWed95: SpecialDay = allDays1995.osku;\n\nconsole.log(easter95.date);\n// Logs new Date('1995-04-23')\nconsole.log(easter95.description);\n// Logs \"Páskadagur\"\n```\n\n---\n\n### `getOtherDays`\n\n**Syntax:** `getOtherDays(year?: number, month?: number): Array\u003cSpecialDay\u003e`\n\nReturns only unofficial, commonly celebrated \"special days\" (that are still\nworkdays) for a given year — optionally narrowed down to a single month.\n\n```ts\nimport { getOtherDays } from \"fridagar\";\n\nconst otherdays2018 = getOtherDays(2018);\nconst otherdaysInDecember2018 = getOtherDays(2018, 12);\n\n// If year is omitted the current year is used\nconst otherdaysThisYear = getOtherDays();\nconst otherdaysInDecemberThisYear = getOtherDays(undefined, 12);\n```\n\n---\n\n### `isHoliday`\n\n**Syntax:** `isHoliday(date: Date): Holiday | undefined`\n\nChecks if a given date is an Icelandic public holiday, and if so, returns\nits info object.\n\n```ts\nimport { isHoliday } from \"fridagar\";\n\nconst res1 = isHoliday(new Date(\"2018-12-24\"));\nconsole.log(res1);\n// Logs the `Holiday` object for Aðfangadagur\n\nconst res2 = isHoliday(new Date(\"2018-12-23\"));\nconsole.log(res2);\n// Logs `undefined` (as Þorláksmessa is not a holiday.)\n```\n\n---\n\n### `isSpecialDay`\n\n**Syntax:** `isSpecialDay(date: Date): Holiday | SpecialDay | undefined`\n\nChecks if a given date is either an Icelandic public holiday or a commonly\ncelebrated \"special\" day, and if so, returns its info object.\n\n```ts\nimport { isSpecialDay } from \"fridagar\";\n\nconst res1 = isSpecialDay(new Date(\"2018-12-24\"));\nconsole.log(res1);\n// Logs the `Holiday` object for Aðfangadagur\n\nconst res2 = isSpecialDay(new Date(\"2018-12-23\"));\nconsole.log(res2);\n// Logs the `SpecialDay` object for Þorláksmessa\n\nconst res3 = isSpecialDay(new Date(\"2018-12-19\"));\nconsole.log(res3);\n// Logs `undefined`  (Because Dec. 19th is just a normal day.)\n```\n\n---\n\n### `workdaysFromDate`\n\n**Syntax:**\n`workdaysFromDate(days: number, refDate?: Date, includeHalfDays?: boolean): Date`\n\nReturns the `days`-th business-day before/after the reference date.\n\nDefaults to counting half-day holidays as \"non-work\" days.\n\n```ts\nimport { workdaysFromDate } from \"fridagar\";\n\nconst dec23th2018 = new Date(\"2018-12-23\"); // Thursday\nconst jan1st2025 = new Date(\"2024-01-01\"); // Tuesday\n\n// Treats Aðfangadagur as a non-work day by default\nconst secondWorkDay = workdaysFromDate(2, dec23th2018);\n// new Date('2021-12-28') // Tuesday\n\n// Optionally treats Aðfangadagur as a work day\nconst secondWorkDayInclHalfDay = workdaysFromDate(2, dec23th2018, true);\n// new Date('2021-12-27') // Monday\n\n// One business days before New Year's day of 2024\nconst prevDay = workdaysFromDate(-1, jan1st2024);\n// new Date('2023-12-29') // Friday\n```\n\nIf the `refDate` is omitted, the current (today) date is used.\n\n```ts\nconst thirdWorkDayFromToday = workdaysFromDate(3);\n```\n\nNOTE: The returned date is always set to 00:00:00 UTC.\n\n---\n\n## Supported Days\n\nThese are the supported days and their identification \n[keys](#type-daykey-holidaykey-specialdaykey):\n\n- **Nýársdagur** (`nyars`)\n- Þrettándinn (`threttand`)\n- Bóndadagur (`bonda`)\n- Bolludagur (`bollu`)\n- Sprengidagur (`sprengi`)\n- Öskudagur (`osku`)\n- Valentínusardagur (`valent`)\n- Konudagur (`konu`)\n- **Skírdagur** (`skir`)\n- **Föstudagurinn langi** (`foslangi`)\n- **Páskadagur** (`paska`)\n- **Annar í páskum** (`paska2`)\n- **Sumardagurinn fyrsti** (`sumar1`)\n- **Verkalýðsdagurinn** (`mai1`)\n- **Uppstigningardagur** (`uppst`)\n- **Hvítasunnudagur** (`hvitas`)\n- **Annar í Hvítasunnu** (`hvitas2`)\n- Sjómannadagurinn (`sjomanna`)\n- **Þjóðhátíðardagurinn** (`jun17`)\n- Sumarsólstöður (`sumsolst`)\n- Jónsmessa (`jonsm`)\n- **Frídagur verslunarmanna** (`verslm`)\n- Fyrsti vetrardagur (`vetur1`)\n- Hrekkjavaka (`hrekkja`)\n- Dagur íslenskrar tungu (`isltungu`)\n- Fullveldisdagurinn (`fullv`)\n- Vetrarsólstöður (`vetsolst`)\n- Þorláksmessa (`thorl`)\n- **Aðfangadagur** (`adfanga`)\n- **Jóladagur** (`jola`)\n- **Annar í Jólum** (`jola2`)\n- **Gamlársdagur** (`gamlars`)\n\n### Open Questions\n\n#### Which Days to Include?\n\nWhat to include is always subjective.\n\nCurrently the list focuses on:\n\n- Official public holidays  (defined in law)\n- Official days of flag-raising (\"fánadagar\") often to do with national \n  independence history, etc.\n- Traditional Icelandic cultural \"special days\", which are a mixture of \n  centuries old folk-traditions and (Christian) religious culture.\n- Days that are actively celebrated despite not fulfilling any of the above \n  criteria. (Like \"Hrekkjavaka\")\n\nThis means \"Valentínusardagur\" is a bit of an oddball in this list.\nIt's inclusion begs the question why we don't include other similar days such \nas \"Mæðradagurinn\", \"Feðradagurinn\", or even \"Singles Day\".\nOr should it be removed?\n\nThe \"on the fence\" category includes:\n\n- Mæðradagurinn \u0026 Feðradagurinn\n- Kvennafrídagurinn\n- Bjórdagurinn\n- Beginning/end of Ramadan\n- St. Patrick's Day\n\n#### Historical Accuracy\n\nExample: \"Dagur íslenskrar tungu\" was first celebrated in 1996. Should \n`getAllDays(1980)` include it or not?\n\nProblem is that many days don't have a definite starting date, they just faded\ninto existence over time. Other days (such as \"Mæðradagurinn\") have had \ndifferent dates at different times.\n\nCurrently the library does NOT aim for historical accuracy, and will return all\n\"modern day\" special days for any year — and completely ignore the fact that\n\"Frídagur verslunarmanna in the year 345 BC\" makes absolutely no sense.\n\n---\n\n## Exported types\n\n---\n\n### type `Holiday`\n\nAn object describing an Icelandic public holiday.\n\n```ts\nimport type { Holiday } from \"fridagar\";\n\n// Example\nconst xmasEve2017: Holiday = {\n  date: new Date(\"2017-12-24T00:00:00.000Z\"),\n  description: \"Aðfangadagur\",\n  key: \"adfanga\", // stable identifier for this holiday\n  holiday: true,\n  halfDay: true,\n};\n```\n\nNOTE: All dates are set to 00:00:00 UTC\n\n---\n\n### type `SpecialDay`\n\nAn object describing an Icelandic commonly celebrated \"special\" day, such as\n\"Bolludagur\", etc.\n\n```ts\nimport type { SpecialDay } from \"fridagar\";\n\n// Example\nconst sovereignDay2017: SpecialDay = {\n  date: new Date(\"2017-12-01T00:00:00.000Z\"),\n  description: \"Fullveldisdagurinn\",\n  key: \"fullv\", // stable identifier for this special day\n  holiday: false, // not a public holiday\n};\n```\n\nNOTE: All dates are set to 00:00:00 UTC\n\n---\n\n### type `DayKey`, `HolidayKey`, `SpecialDayKey`\n\nString union types of all possible `key` values for `Holiday` and\n`SpecialDay` objects. These are mainly useful when translating the day\nnames/descriptions into other languages.\n\n```ts\nimport type { DayKey, HolidayKey, SpecialDayKey } from \"fridagar\";\n\nconst holidayNamesPolish: Record\u003cHolidayKey, string\u003e = {\n  nyars: \"Nowy Rok\",\n  adfanga: \"Wigilia\",\n  jola: \"Boże Narodzenie\",\n  // etc...\n};\nconst specialDayNamesPolish: Record\u003cSpecialDayKey, string\u003e = {\n  bollu: \"Dzień Pączka\",\n  sjomanna: \"Dzień Marynarza\",\n  // etc...\n};\n\n// DayKey is a shorthand union of HolidayKey and SpecialDayKey\nconst allDayNamesPolish: Record\u003cDayKey, string\u003e = {\n  ...holidayNamesPolish,\n  ...specialDayNamesPolish,\n};\n```\n\n---\n\n## Contributing\n\nThis project uses the [Bun runtime](https://bun.sh) for development (tests,\nbuild, etc.)\n\nPRs are welcoms!\n\n---\n\n## Change Log\n\nSee [CHANGELOG.md](https://github.com/gaui/fridagar-node/blob/dev/CHANGELOG.md)\n\n## Other Iceland-Themed Libraries\n\n- [`is-kennitala`](https://npmjs.com/package/is-kennitala) - Best-of-breed kennitala (Icelandic national ID) validation and utility library.\n- [`postnumer`](https://npmjs.com/package/postnumer) - Icelandic post-codes (Póstnúmer) and town/locality names and their National Registry ID codes.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaui%2Ffridagar-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaui%2Ffridagar-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaui%2Ffridagar-node/lists"}