{"id":25541527,"url":"https://github.com/peterknezek/name-day-calendar","last_synced_at":"2025-04-11T17:04:23.761Z","repository":{"id":57307559,"uuid":"440234154","full_name":"peterknezek/name-day-calendar","owner":"peterknezek","description":"Module for providing lists of the official names in a calendar by specific country. Name by day with additional options (e.g. by sex). Contain names database, handlers, and types for TypeScript.","archived":false,"fork":false,"pushed_at":"2025-03-07T18:30:11.000Z","size":1091,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T13:02:46.978Z","etag":null,"topics":["calendar","database","date","name-day","names"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterknezek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2021-12-20T16:22:10.000Z","updated_at":"2025-03-07T18:30:15.000Z","dependencies_parsed_at":"2024-03-02T23:23:16.703Z","dependency_job_id":"42b8057f-01bd-4768-8fa3-03be6c99a554","html_url":"https://github.com/peterknezek/name-day-calendar","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"9fb5dab076b260fbdd3a80b19e2be53283f1d6d4"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterknezek%2Fname-day-calendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterknezek%2Fname-day-calendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterknezek%2Fname-day-calendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterknezek%2Fname-day-calendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterknezek","download_url":"https://codeload.github.com/peterknezek/name-day-calendar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248446779,"owners_count":21105130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["calendar","database","date","name-day","names"],"created_at":"2025-02-20T06:38:29.714Z","updated_at":"2025-04-11T17:04:23.735Z","avatar_url":"https://github.com/peterknezek.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# name-day-calendar\n\nModule for providing lists of the official names in a calendar by specific country. Name by day with additional options (e.g.by sex). It contains the name's database, the handlers, and the types for TypeScript.\n\n[![Version](https://img.shields.io/npm/v/name-day-calendar.svg)](https://npmjs.org/package/name-day-calendar)\n[![Downloads/week](https://img.shields.io/npm/dw/name-day-calendar.svg)](https://npmjs.org/package/name-day-calendar)\n[![License](https://img.shields.io/npm/l/name-day-calendar.svg)](https://github.com/peterknezek/name-day-calendar/blob/master/package.json)\n\n## Install\n\n```\nnpm install name-day-calendar\n```\n\n## Supported Countries\n\nIf you are missing name days from your country please consider [CONTRIBUTING](https://github.com/peterknezek/name-day-calendar/blob/main/CONTRIBUTING.md).\n\n\u003c!-- !tree --\u003e\n\n```\nCountries: 1\n├── SK: Slovenská republika (467 names)\n├── AT: Österreich (not yet)\n├── CZ: Česká republika (not yet)\n├── PL: Polska (not yet)\n└── HU: Magyarország (not yet)\n```\n\n\u003c!-- tree! --\u003e\n\n## Usage\n\nTo avoid big bundle size. Data are splited by a country, month, and sex to support the tree shaking.\n\n\n# API\n\n## `getNameOnDate`\n\n- Return the array of names related to the provided date.\n\nFunction's parameters:\n\n```ts\nasync function getNameOnDate (\n  date: `${Month}-${Day}` | Date,\n  options?: {\n    lang?: 'SK';\n    sex?: 'male' | 'female';\n  }\n)\n```\nExamples:\n\n```ts\nimport { getNameOnDate } from 'name-day-calendar';\n\n// get all name days for a specific date (don’t forget the months are 0-indexed in JS)\nconst name: string[] = await getNameOnDate(new Date(1988, 5, 29));\n\n// get all name days on a specific date and just for Slovakia.\nconst name: string[] = await getNameOnDate('6-30', { lang: 'SK' });\n\n// get all name days on a specific date, just for Slovakia, and just male-specific names\nconst name: string[] = await getNameOnDate('6-30', { sex: 'male', lang: 'SK' });\n```\n\nResponse:\n\n```\n['Peter', 'Pavol', 'Petra']\n```\n\n## `getNamesByMonth`\n\n- Returns an object with dates and names related to the provided month.\n\nFunction parameters:\n\n```ts\nasync function getNameOnDate (\n  options: {\n    month: number; // 1-12 \n    lang?: 'SK';\n    sex?: 'male' | 'female';\n  }\n)\n```\nExamples:\n\n```ts\nimport { getNamesByMonth } from 'name-day-calendar';\n\n// get all names for a specific month\nconst names = await getNamesByMonth({month: 6});\n\n// get all names for a specific month, but just for Slovakia\nconst names = await getNamesByMonth({ month: 6, lang: 'SK' });\n\n// get all names for a specific month, just for Slovakia and the male gender\nconst names = await getNamesByMonth({ month: 6, sex: 'male', lang: 'SK' });\n```\n\nResponse:\n\n```\n{\n  '6-1': [...],\n  ...\n  '6-30': ['Peter', 'Pavol', 'Petra'],\n}\n```\n\n## Contribution and License Agreement\n\nYou like to contribute please read [CONTRIBUTING.md](https://github.com/peterknezek/name-day-calendar/blob/main/CONTRIBUTING.md).\n\nIf you contribute code to this project, you are implicitly allowing your\ncode to be distributed under the MIT license. You are also implicitly\nverifying that all code is your original work or correctly attributed\nwith the source of its origin and license.\n\nSee [LICENSE](https://github.com/peterknezek/name-day-calendar/blob/main/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterknezek%2Fname-day-calendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterknezek%2Fname-day-calendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterknezek%2Fname-day-calendar/lists"}