{"_id":"@dancsg/date-converter","_rev":"6-7bb9085397aa3d8c7c5e7aa78d270d19","name":"@dancsg/date-converter","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@dancsg/date-converter","version":"1.0.0","keywords":[],"author":"","license":"ISC","_id":"@dancsg/date-converter@1.0.0","maintainers":[{"name":"dancsg","email":"dancs.gergely@gmail.com"}],"dist":{"shasum":"9c39df5d18a3f1ffe52c9986e1a1c15e26064992","tarball":"https://registry.npmjs.org/@dancsg/date-converter/-/date-converter-1.0.0.tgz","fileCount":7,"integrity":"sha512-WzyVNbD8zHeJwJ1IOb6lhXEveGrvVSAiFM/LBrdSGN0nt1n0v3gAY9crThoQ61JX2x9fdH1AL1LkSjdw46PdSg==","signatures":[{"sig":"MEQCIHfZW792A4c7J+DwuwdMT0kkQX1JEpTwN1mvyakQWflwAiBSbMdJYjR/+0ly8vwQyEUfGiktWDDR+QAO/o5DSJt9oQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21537},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"test":"jest","build":"tsup src/index.ts --format esm,cjs --dts","prepublishOnly":"npm run build"},"_npmUser":{"name":"dancsg","email":"dancs.gergely@gmail.com"},"_npmVersion":"9.8.1","directories":{},"_nodeVersion":"18.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.4.0","ts-jest":"^29.3.2","typescript":"^5.8.3","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/date-converter_1.0.0_1746352850497_0.8785500961174162","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@dancsg/date-converter","version":"1.0.1","keywords":[],"author":"","license":"ISC","_id":"@dancsg/date-converter@1.0.1","maintainers":[{"name":"dancsg","email":"dancs.gergely@gmail.com"}],"dist":{"shasum":"81d6b3be7badf756fcdc34542d6ec6738f818aee","tarball":"https://registry.npmjs.org/@dancsg/date-converter/-/date-converter-1.0.1.tgz","fileCount":7,"integrity":"sha512-dsonfG32rxtmywGy0ZqXXeO9uDz6sSUDYaAID+Bspk9Y3NBpYR69RzhNsCGT1DVfExAXfN6ibk9yCP2V+MOoFg==","signatures":[{"sig":"MEUCIQDJVWFHTpjL5D2kbY8ENXPSz5BjeDKtqTEHt21JRt9T0wIgCPn46ApZiLTXOIL+doP3qPIvaH0m0/aNYp2w+z2CJc4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22515},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"test":"jest","build":"tsup src/index.ts --format esm,cjs --dts","prepublishOnly":"npm run build"},"_npmUser":{"name":"dancsg","email":"dancs.gergely@gmail.com"},"_npmVersion":"9.8.1","directories":{},"_nodeVersion":"18.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.4.0","ts-jest":"^29.3.2","typescript":"^5.8.3","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/date-converter_1.0.1_1746361601443_0.3155926948259855","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@dancsg/date-converter","version":"1.0.2","keywords":[],"author":"","license":"ISC","_id":"@dancsg/date-converter@1.0.2","maintainers":[{"name":"dancsg","email":"dancs.gergely@gmail.com"}],"dist":{"shasum":"2f2820c91c34194a295f9e369d1810aab6341462","tarball":"https://registry.npmjs.org/@dancsg/date-converter/-/date-converter-1.0.2.tgz","fileCount":8,"integrity":"sha512-3XJuig3auDveAp2xa4QmPz4C4x5m2vWNYPWK2DK9H+pfqVx51veH7bQEqhF+qgoC2WMTCDg6BkdDm/0LWod41g==","signatures":[{"sig":"MEYCIQC8seCGL3iF5eDjz74Pv3Dyb+PEIghpfRPCI/dZS9VHogIhAOMc0O1cmc26H55MDo0mloSna8eBwSGycVqqLhuKVj42","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23213},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"e8fd3c4e58253c9bcc6dc020bed3b62ffe166988","scripts":{"test":"jest","build":"tsup src/index.ts --format esm,cjs --dts","prepublishOnly":"npm run build"},"_npmUser":{"name":"dancsg","email":"dancs.gergely@gmail.com"},"_npmVersion":"9.8.1","description":"A lightweight TypeScript utility for building, validating, and formatting dates from various input types.","directories":{},"_nodeVersion":"18.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.4.0","ts-jest":"^29.3.2","typescript":"^5.8.3","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/date-converter_1.0.2_1746367002258_0.7396775023820317","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@dancsg/date-converter","version":"1.0.3","keywords":[],"author":"","license":"ISC","_id":"@dancsg/date-converter@1.0.3","maintainers":[{"name":"dancsg","email":"dancs.gergely@gmail.com"}],"dist":{"shasum":"b7f44133bd10d159b83f9d7237b7f654f224ac81","tarball":"https://registry.npmjs.org/@dancsg/date-converter/-/date-converter-1.0.3.tgz","fileCount":8,"integrity":"sha512-Qfgq5HNd6l8C4Z7W15FqL0e7Bnm2wIRq5TkvvZwo4ud5ZLUWB6XSTj22gWEqTd+qpC6+P9DN6Ien1hp6a71+3g==","signatures":[{"sig":"MEUCIEQnd1j47CfwSAx3nAvJ96gIfYnltPWJJejHrpfbMpzDAiEAwya+zN9mSlUpJdEJKVtaZ7j8XL35aaVYBuKYSp/PFpI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24251},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"7a855aba37eff953e053229ae9090fc78f5ccd77","scripts":{"test":"jest","build":"tsup src/index.ts --format esm,cjs --dts","prepublishOnly":"npm run build"},"_npmUser":{"name":"dancsg","email":"dancs.gergely@gmail.com"},"_npmVersion":"9.8.1","description":"A lightweight TypeScript utility for building, validating, and formatting dates from various input types.","directories":{},"_nodeVersion":"18.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.4.0","ts-jest":"^29.3.2","typescript":"^5.8.3","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/date-converter_1.0.3_1746367989908_0.9781240972308314","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@dancsg/date-converter","version":"1.0.4","keywords":["date","date-builder","typescript","date-formatting","date-parser","date-utils"],"author":"","license":"ISC","_id":"@dancsg/date-converter@1.0.4","maintainers":[{"name":"dancsg","email":"dancs.gergely@gmail.com"}],"dist":{"shasum":"9172161e326f2594bd7f1c988bd82b83804a3295","tarball":"https://registry.npmjs.org/@dancsg/date-converter/-/date-converter-1.0.4.tgz","fileCount":8,"integrity":"sha512-y7fnuw9oYqLTPC1HxtxNR41mQWhztiWZdVVQoUI+rMwp74kGHKIKISyCmFAkUX/gB5AYTheyiV782yh38PZOWg==","signatures":[{"sig":"MEUCIH+UOnmGZvPRH0Oqyy/q/ILr4eV4XLl1I5lXHxvwYnEfAiEAxUT4r55Xt7xd3n4an+GN46weCJHcr4GjSyBIN8Xdfg0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24442},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"7ab671546c5fb89c677e62f271d9fcbc04c209ab","scripts":{"test":"jest","build":"tsup src/index.ts --format esm,cjs --dts","prepublishOnly":"npm run build"},"_npmUser":{"name":"dancsg","email":"dancs.gergely@gmail.com"},"_npmVersion":"9.8.1","description":"A lightweight TypeScript utility for building, validating, and formatting dates","directories":{},"_nodeVersion":"18.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.4.0","ts-jest":"^29.3.2","typescript":"^5.8.3","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/date-converter_1.0.4_1746368182596_0.01868818796198579","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@dancsg/date-converter","version":"1.0.5","description":"A lightweight TypeScript utility for building, validating, and formatting dates","keywords":["date","date-builder","typescript","date-formatting","date-parser","date-utils"],"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts","prepublishOnly":"npm run build","test":"jest"},"author":"","license":"ISC","devDependencies":{"@types/jest":"^29.5.14","jest":"^29.7.0","ts-jest":"^29.3.2","tsup":"^8.4.0","typescript":"^5.8.3"},"_id":"@dancsg/date-converter@1.0.5","gitHead":"fbd9a0ce4fee447391213b0ce7695d847de9d202","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-tGBy/up/fFWUnjdl0YUs9Jqzj8hMSlsFYXcaGSU09Z7M0m1OFXzBnS4KCrc1MkSsjtiD5Bq0kYeh8MOneZbKEA==","shasum":"4477f2ca06241f995b3727ed7e23a152c3a76eca","tarball":"https://registry.npmjs.org/@dancsg/date-converter/-/date-converter-1.0.5.tgz","fileCount":8,"unpackedSize":24452,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDnHaXTgaikaCvUPREf+RxqxYmXsF1EFGQ5fjyufUWNAgIgcSjhufauVjNequPcKaHbKj4+/gRpXZcQqRRvGNpjdeM="}]},"_npmUser":{"name":"dancsg","email":"dancs.gergely@gmail.com"},"directories":{},"maintainers":[{"name":"dancsg","email":"dancs.gergely@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/date-converter_1.0.5_1746368334959_0.637028799027457"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-04T10:00:50.404Z","modified":"2025-05-04T14:18:55.335Z","1.0.0":"2025-05-04T10:00:50.718Z","1.0.1":"2025-05-04T12:26:41.631Z","1.0.2":"2025-05-04T13:56:42.422Z","1.0.3":"2025-05-04T14:13:10.088Z","1.0.4":"2025-05-04T14:16:22.779Z","1.0.5":"2025-05-04T14:18:55.163Z"},"license":"ISC","keywords":["date","date-builder","typescript","date-formatting","date-parser","date-utils"],"description":"A lightweight TypeScript utility for building, validating, and formatting dates","maintainers":[{"name":"dancsg","email":"dancs.gergely@gmail.com"}],"readme":"# date-builder\r\n\r\nA lightweight TypeScript utility for building, validating, and formatting dates from various input types.\r\n\r\n## ✨ Features\r\n\r\n- Accepts multiple date formats:\r\n    - ISO strings (`\"2024-05-04T00:00:00Z\"`)\r\n    - Simple string format (`\"2024-05-04\"`)\r\n    - Unix timestamps (seconds or milliseconds)\r\n    - JavaScript `Date` objects\r\n    - Custom objects (`{ day, month, year }`)\r\n- Built-in validation with helpful error messages\r\n- Easy formatting with common placeholders (`yyyy`, `MM`, `dd`, `dddd`, `MMMM`)\r\n- Safe UTC-based parsing to avoid timezone issues\r\n- Localized output support via `Intl.DateTimeFormat`\r\n\r\n## 🚀 Usage\r\n\r\n```ts\r\nimport { DateBuilder } from 'date-builder';\r\n\r\n// From ISO string\r\nconst isoDate = DateBuilder.from(\"2024-05-04\");\r\n\r\n// From object\r\nconst objDate = DateBuilder.from({ day: 4, month: 5, year: 2024 });\r\n\r\n// From timestamp\r\nconst tsDate = DateBuilder.from(1714780800);\r\n\r\n// From JS Date\r\nconst nativeDate = DateBuilder.from(new Date());\r\n\r\n// From now\r\nconst now = DateBuilder.fromNow();\r\n\r\nconsole.log(isoDate.format(\"yyyy-MM-dd\"));          // \"2024-05-04\"\r\nconsole.log(isoDate.format(\"dddd, MMMM dd, yyyy\")); // \"Saturday, May 04, 2024\"\r\nconsole.log(isoDate.toUnix());                      // 1714780800\r\nconsole.log(isoDate.toISO());                       // \"2024-05-04T00:00:00.000Z\"\r\n\r\nconsole.log(now.toLocale(\"de-DE\", { dateStyle: \"full\" })); // \"Samstag, 4. Mai 2024\" \r\n```\r\n\r\n##  Input Types Supported\r\n - \"2024-05-04\" (string)\r\n\r\n - 1714780800 (number - seconds)\r\n\r\n - 1714780800000 (number - milliseconds)\r\n\r\n - new Date() (JS Date object)\r\n\r\n - { day: 4, month: 5, year: 2024 } (custom object)\r\n\r\n\r\n## 📦 Installation\r\n\r\n```bash\r\nnpm install @dancsg/date-converter\r\n","readmeFilename":"README.md"}