{"_id":"@atom-forge/date-format","_rev":"3-23187a81f3f8caac2e15c263a0826154","name":"@atom-forge/date-format","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@atom-forge/date-format","version":"0.1.0","keywords":["date","format","intl","typescript"],"author":{"url":"https://github.com/laborci","name":"Gergely Laborci"},"license":"MIT","_id":"@atom-forge/date-format@0.1.0","maintainers":[{"name":"laborci","email":"gergely@laborci.hu"}],"homepage":"https://github.com/atom-forge/date-format#readme","bugs":{"url":"https://github.com/atom-forge/date-format/issues"},"dist":{"shasum":"01f1e3ea2e9585a737f533d770d588ba85aae9dc","tarball":"https://registry.npmjs.org/@atom-forge/date-format/-/date-format-0.1.0.tgz","fileCount":5,"integrity":"sha512-BP4AxYO4e/QUO/fc5toEkR4ugvvcknmy7ksAUSInF6r2hEEBD7laOunLwdf37j+uiNbX8lMSdDcnDKgmPk4Dxw==","signatures":[{"sig":"MEYCIQDHHo+6h9q/igiTYQrSAXc5vQY3jsl959f6KKTBz/Y91AIhAInM9GxJLDFk1JEH57GPSnjh3Wn4IB3Zd/y4ngdXmTml","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5904},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"7f07e0cb5e43e04f64c8e3f5a95ec152652799f0","scripts":{"build":"tsc","release":"npm publish --access public","prepublishOnly":"bun run build"},"_npmUser":{"name":"laborci","email":"gergely@laborci.hu"},"repository":{"url":"git://github.com/atom-forge/date-format.git"},"_npmVersion":"11.4.2","description":"Lightweight, token-based date formatting utility using Intl.DateTimeFormat","directories":{},"_nodeVersion":"24.4.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^25.3.1"},"_npmOperationalInternal":{"tmp":"tmp/date-format_0.1.0_1775549387891_0.14850915371049522","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@atom-forge/date-format","version":"0.1.2","keywords":["date","format","intl","typescript"],"author":{"url":"https://github.com/laborci","name":"Gergely Laborci"},"license":"MIT","_id":"@atom-forge/date-format@0.1.2","maintainers":[{"name":"laborci","email":"gergely@laborci.hu"}],"homepage":"https://github.com/atom-forge/date-format#readme","bugs":{"url":"https://github.com/atom-forge/date-format/issues"},"dist":{"shasum":"f93a3e0ade6b6e13d3be3639fb4a28c636dc89c9","tarball":"https://registry.npmjs.org/@atom-forge/date-format/-/date-format-0.1.2.tgz","fileCount":5,"integrity":"sha512-GZc0d9ws+j807qktIVJpUd6RXIWtgWS8FZ4JwKrWKPFBWf2TS2/hoh0qzSoyIQvd2CnO1cmI85qudxsU5ZTosQ==","signatures":[{"sig":"MEUCIQDPqIGIYwTlU6maRS6AWK7QspsRcrONC16U/fMumVP71QIgUNvY5c8jjVoQbPa44EtZ/Pmqu0HKXel5AHKE17Hz9wE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@atom-forge%2fdate-format@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":5904},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"d0eda9923ff4be82eacfc9de336b917261f6db04","scripts":{"build":"tsc","release":"npm publish --access public","prepublishOnly":"bun run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:df62d40a-7ce6-4078-90ce-ac5b7fc43e4e"}},"repository":{"url":"git://github.com/atom-forge/date-format.git"},"_npmVersion":"11.13.0","description":"Lightweight, token-based date formatting utility using Intl.DateTimeFormat","directories":{},"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^25.3.1"},"_npmOperationalInternal":{"tmp":"tmp/date-format_0.1.2_1780312925388_0.7906359482852139","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@atom-forge/date-format","version":"0.1.3","description":"Lightweight, token-based date formatting utility using Intl.DateTimeFormat","keywords":["date","format","intl","typescript"],"author":{"name":"Gergely Laborci","url":"https://github.com/laborci"},"license":"MIT","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"repository":{"url":"git://github.com/atom-forge/date-format.git"},"scripts":{"build":"tsc","prepublishOnly":"bun run build","release":"npm publish --access public","pub-check":"bun run scripts/pub-check.ts","pub":"bun run scripts/pub.ts"},"devDependencies":{"@types/node":"^25.3.1","typescript":"^5.0.0"},"gitHead":"5bdb9ecdeeff020ddca85697132dede67dd18092","_id":"@atom-forge/date-format@0.1.3","bugs":{"url":"https://github.com/atom-forge/date-format/issues"},"homepage":"https://github.com/atom-forge/date-format#readme","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-vk9jpBm+PyEodetQOE3r370YghG0S1U2L2esQn20oyaQgEEmvOF8a964/8sxmRFuarY/aRnmFJ94P9gF2sD5qg==","shasum":"1ffd981af08dc5f450e63a31417706cc11030b16","tarball":"https://registry.npmjs.org/@atom-forge/date-format/-/date-format-0.1.3.tgz","fileCount":6,"unpackedSize":6365,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@atom-forge%2fdate-format@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHjR9A5AttTgYhB94lCt3Mc50Dz/JzQP40l8OjlwxIAtAiAGwkqTw5wKvbvpFwEbjscItRWr3dppLN1fmUlRlWzusQ=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:df62d40a-7ce6-4078-90ce-ac5b7fc43e4e"}},"directories":{},"maintainers":[{"name":"laborci","email":"gergely@laborci.hu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/date-format_0.1.3_1787833470965_0.3513261671491612"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-07T08:09:47.777Z","modified":"2026-08-27T12:24:31.472Z","0.1.0":"2026-04-07T08:09:48.046Z","0.1.2":"2026-06-01T11:22:05.539Z","0.1.3":"2026-08-27T12:24:31.116Z"},"bugs":{"url":"https://github.com/atom-forge/date-format/issues"},"author":{"name":"Gergely Laborci","url":"https://github.com/laborci"},"license":"MIT","homepage":"https://github.com/atom-forge/date-format#readme","keywords":["date","format","intl","typescript"],"repository":{"url":"git://github.com/atom-forge/date-format.git"},"description":"Lightweight, token-based date formatting utility using Intl.DateTimeFormat","maintainers":[{"name":"laborci","email":"gergely@laborci.hu"}],"readme":"# @atom-forge/date-format\n\nLightweight, token-based date formatting utility built on `Intl.DateTimeFormat`.\n\n## Installation\n\n```bash\nbun add @atom-forge/date-format\n```\n\n## Usage\n\n```ts\nimport { dateFormat } from \"@atom-forge/date-format\";\n\ndateFormat(\"%Y-%M-%D\")               // \"2026-04-07\"\ndateFormat(\"$M %D, %Y\")             // \"April 07, 2026\"\ndateFormat(\"%H:%I:%S\")               // \"14:05:03\"\ndateFormat(\"%D $M %Y\", \"2024-12-24\") // \"24 Dec 2024\"\ndateFormat(\"%Y\", new Date(), \"hu-HU\") // \"2026\"\ndateFormat(\"%H:%I\", new Date(), \"en-GB\", \"America/New_York\") // \"08:05\"\n```\n\n## Signature\n\n```ts\nfunction dateFormat(\n  format: string,\n  date?: Date | string,   // default: now\n  lang?: string,          // default: \"en-GB\"\n  timeZone?: string       // optional, e.g. \"Europe/Budapest\"\n): string\n```\n\n## Tokens\n\n### Numeric\n\n| Token | Description         | Example |\n|-------|---------------------|---------|\n| `%Y`  | Year, full          | `2026`  |\n| `%y`  | Year, 2-digit       | `26`    |\n| `%m`  | Month, numeric      | `4`     |\n| `%M`  | Month, 2-digit      | `04`    |\n| `%d`  | Day, numeric        | `7`     |\n| `%D`  | Day, 2-digit        | `07`    |\n| `%h`  | Hour, 24h numeric   | `9`     |\n| `%H`  | Hour, 24h 2-digit   | `09`    |\n| `%g`  | Hour, 12h numeric   | `9`     |\n| `%G`  | Hour, 12h 2-digit   | `09`    |\n| `%i`  | Minute, numeric     | `5`     |\n| `%I`  | Minute, 2-digit     | `05`    |\n| `%s`  | Second, numeric     | `3`     |\n| `%S`  | Second, 2-digit     | `03`    |\n\n### Text\n\n| Token | Description        | Example                   |\n|-------|--------------------|---------------------------|\n| `$m`  | Month, short       | `Apr`                     |\n| `$M`  | Month, long        | `April`                   |\n| `$d`  | Weekday, narrow    | `T`                       |\n| `$w`  | Weekday, short     | `Tue`                     |\n| `$D`  | Weekday, long      | `Tuesday`                 |\n| `$W`  | Weekday, long      | `Tuesday`                 |\n| `$p`  | AM/PM, short       | `am`                      |\n| `$P`  | AM/PM, long        | `in the morning`          |\n| `$z`  | Timezone, short    | `CET`                     |\n| `$Z`  | Timezone, long     | `Central European Time`   |\n","readmeFilename":"README.md"}