{"_id":"@akatan/date-to-festive","_rev":"3-eeb53245033bf1d89dcebb33aabc47be","name":"@akatan/date-to-festive","dist-tags":{"latest":"1.0.8"},"versions":{"1.0.6":{"name":"@akatan/date-to-festive","version":"1.0.6","keywords":["theme","date","resolver","seasonal","holidays","cultural"],"author":{"name":"AkatanHQ"},"license":"MIT","_id":"@akatan/date-to-festive@1.0.6","maintainers":[{"name":"mariahendrikx","email":"mariahendrikx@gmail.com"}],"homepage":"https://github.com/AkatanHQ/date-to-festive#readme","bugs":{"url":"https://github.com/AkatanHQ/date-to-festive/issues"},"dist":{"shasum":"27ac7836a0033f7322bf93b081259ea66f336ca1","tarball":"https://registry.npmjs.org/@akatan/date-to-festive/-/date-to-festive-1.0.6.tgz","fileCount":8,"integrity":"sha512-xKFVRm7BwLqb1MFqGVSyvLBaQF9trOnRH8KABoiZTtKRZNRoapYgW7cR3EIQwAn8YD4zP13F3BXeB5XbrEuQ5g==","signatures":[{"sig":"MEQCIADYeBJfSG4tomwPSO/25r/SV545hcE1nZNCzmWRMIeEAiBkLZyWq5lXawbEdoQHYgKumg8bv1H26biNYDnIjbZ1Yg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21843},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","engines":{"node":">=14.0.0"},"gitHead":"34f58d18faa023bb5d53dc4a1422e1c041118328","scripts":{"dev":"tsc --watch","build":"tsc","clean":"rimraf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"mariahendrikx","email":"mariahendrikx@gmail.com"},"repository":{"url":"git+ssh://git@github.com/AkatanHQ/date-to-festive.git","type":"git"},"_npmVersion":"11.8.0","description":"A standalone, reusable module for resolving themes based on dates","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.1.3","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/date-to-festive_1.0.6_1775988414382_0.008386357490272722","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@akatan/date-to-festive","version":"1.0.7","keywords":["theme","date","resolver","seasonal","holidays","cultural"],"author":{"name":"AkatanHQ"},"license":"MIT","_id":"@akatan/date-to-festive@1.0.7","maintainers":[{"name":"mariahendrikx","email":"mariahendrikx@gmail.com"}],"homepage":"https://github.com/AkatanHQ/date-to-festive#readme","bugs":{"url":"https://github.com/AkatanHQ/date-to-festive/issues"},"dist":{"shasum":"95f837173f38f613f858e35b9c5b12da7e6a26b2","tarball":"https://registry.npmjs.org/@akatan/date-to-festive/-/date-to-festive-1.0.7.tgz","fileCount":8,"integrity":"sha512-BPNUzBK9/V9VutqLFlotfZJJRO+l03TwxuPpspYDvLtQ+wCJ82zNjA2ekGJukI95xpriVyUyRQfDDC+v3iH4pw==","signatures":[{"sig":"MEUCIQDtHklBCxlOUg8J0Ankq1hFFGbgbC4b/t71oktqpUuEXwIgdOaDwvsnDD8vO4Qbxin4qYwp+Hg5NUP9B4aWyxuTJXc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21849},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","engines":{"node":">=14.0.0"},"gitHead":"34f58d18faa023bb5d53dc4a1422e1c041118328","scripts":{"dev":"tsc --watch","build":"tsc","clean":"rimraf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"mariahendrikx","email":"mariahendrikx@gmail.com"},"repository":{"url":"git+ssh://git@github.com/AkatanHQ/date-to-festive.git","type":"git"},"_npmVersion":"11.8.0","description":"A standalone, reusable module for resolving themes based on dates","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.1.3","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/date-to-festive_1.0.7_1775993830969_0.24697171459496037","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"name":"@akatan/date-to-festive","version":"1.0.8","description":"A standalone, reusable module for resolving themes based on dates","type":"module","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","dev":"tsc --watch","clean":"rimraf dist","prepublishOnly":"npm run clean && npm run build"},"keywords":["theme","date","resolver","seasonal","holidays","cultural"],"author":{"name":"AkatanHQ"},"license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/AkatanHQ/date-to-festive.git"},"bugs":{"url":"https://github.com/AkatanHQ/date-to-festive/issues"},"homepage":"https://github.com/AkatanHQ/date-to-festive#readme","devDependencies":{"rimraf":"^6.1.3","typescript":"^5.0.0"},"engines":{"node":">=14.0.0"},"gitHead":"34f58d18faa023bb5d53dc4a1422e1c041118328","_id":"@akatan/date-to-festive@1.0.8","_nodeVersion":"24.13.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-JvJZ2TTfSAXid41BXDgq8uMR6zifKY+26mCYLvoj+YNiariIBg0WMADhRj7C+S368LrfnyFgaXYySYFFMAE+0Q==","shasum":"be232af4aa519a31f4877b6025244b5c3fd2475a","tarball":"https://registry.npmjs.org/@akatan/date-to-festive/-/date-to-festive-1.0.8.tgz","fileCount":8,"unpackedSize":21871,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD1DdLVcyum+zLBr03qdpt0ItCuFjAu7G5aikJpwFu1XgIgJS+vCwCXBhahgRQLH5QZEXNysqTCfjOhp5GtyFedNKU="}]},"_npmUser":{"name":"mariahendrikx","email":"mariahendrikx@gmail.com"},"directories":{},"maintainers":[{"name":"mariahendrikx","email":"mariahendrikx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/date-to-festive_1.0.8_1775994157787_0.4366230508916371"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-12T10:06:54.305Z","modified":"2026-04-12T11:42:38.068Z","1.0.6":"2026-04-12T10:06:54.535Z","1.0.7":"2026-04-12T11:37:11.102Z","1.0.8":"2026-04-12T11:42:37.936Z"},"bugs":{"url":"https://github.com/AkatanHQ/date-to-festive/issues"},"author":{"name":"AkatanHQ"},"license":"MIT","homepage":"https://github.com/AkatanHQ/date-to-festive#readme","keywords":["theme","date","resolver","seasonal","holidays","cultural"],"repository":{"type":"git","url":"git+ssh://git@github.com/AkatanHQ/date-to-festive.git"},"description":"A standalone, reusable module for resolving themes based on dates","maintainers":[{"name":"mariahendrikx","email":"mariahendrikx@gmail.com"}],"readme":"# Date To Festive\n\nA standalone, reusable module for resolving themes based on dates. Zero dependencies, simple API.\n\n## Installation\n\n```bash\nnpm install @akatan/date-to-festive\n```\n\n## Usage\n\n### Simple Example\n\n```typescript\nimport { resolvePrimaryThemeForDate } from '@akatanhq/date-to-festive';\n\n// Get today's theme\nconst theme = resolvePrimaryThemeForDate(new Date());\nconsole.log(theme);\n// { name: 'winter', category: 'seasonal', metadata: { description: '...' } }\n```\n\n### Get All Matching Themes\n\n```typescript\nimport { resolveThemesForDate } from '@akatan/date-to-festive';\n\n// Get all themes for Christmas\nconst themes = resolveThemesForDate(new Date('2025-12-25'));\n// [{ name: 'christmas', category: 'seasonal', metadata: {...} }]\n```\n\n### With Cultural Themes\n\n```typescript\nconst themes = resolveThemesForDate(\n  new Date('2025-10-23'),\n  {\n    enabledCultures: ['diwali'],\n    userRegion: 'india'\n  }\n);\n// [{ name: 'diwali', category: 'cultural', ... }, ...]\n```\n\n## API\n\n### `resolvePrimaryThemeForDate(date, options?)`\n\nReturns the most specific theme for a given date.\n\n**Parameters:**\n- `date: Date` - The date to resolve\n- `options?: ResolverOptions`\n  - `enabledCultures?: string[]` - Cultural themes to enable\n  - `userRegion?: string` - User's region\n\n**Returns:** `ResolvedTheme | null`\n\n### `resolveThemesForDate(date, options?)`\n\nReturns all matching themes for a given date, sorted by specificity.\n\n**Parameters:** Same as above\n\n**Returns:** `ResolvedTheme[]`\n\n## Theme Types\n\nThe module includes:\n- **Seasonal**: winter, spring, summer, autumn, etc.\n- **Holidays**: christmas, halloween, easter, thanksgiving, etc.\n- **Cultural**: diwali, chinese-new-year, hanukkah, ramadan, etc. (opt-in)\n- **Everyday**: fallback theme when nothing matches\n\n## Features\n\n- ✅ Zero dependencies\n- ✅ TypeScript support\n- ✅ Simple API - just pass a date\n- ✅ Handles year wrap-around (e.g., New Year)\n- ✅ Calculated holidays (Easter, Thanksgiving)\n- ✅ Cultural theme support with opt-in\n- ✅ Specificity sorting (shorter duration = higher priority)\n\n## License\n\nMIT\n\n## Repository\n\nhttps://github.com/akatanhq/date-to-festive\n","readmeFilename":"README.md"}