{"_id":"@ayapapa-npm/date-formatter-js","_rev":"3-1d50103b9cbfd202b2afcfb0ea774631","name":"@ayapapa-npm/date-formatter-js","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@ayapapa-npm/date-formatter-js","version":"0.1.0","author":{"name":"ayapapa"},"license":"MIT","_id":"@ayapapa-npm/date-formatter-js@0.1.0","maintainers":[{"name":"ayapapa-npm","email":"maas.daon@gmail.com"}],"dist":{"shasum":"0bcb7d19bb9565a059b9757942b49954db0127d4","tarball":"https://registry.npmjs.org/@ayapapa-npm/date-formatter-js/-/date-formatter-js-0.1.0.tgz","fileCount":7,"integrity":"sha512-LLsbVCqlT5t7VzGDpktVgDOZ8C6jFcRmq2K+iz+vpr1v00CrzknppyNdHYibLRd+twHpMJXsdjoo8iiXs+uClQ==","signatures":[{"sig":"MEUCIDxoZNe+IrkwpUqJPbL7qvsneGQp+fdwFTH1blMOU2bvAiEAyjbEXr4LiyZQt08VVamxgklqNp7O4RNGn62KTQXMWlo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13872},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"928bab5c37ba7294bf7b66e1a8150b1e99e04c5c","scripts":{"test":"vitest run","build":"tsup src/index.ts --format esm,cjs --out-dir dist --clean --dts","check":"npm run typecheck && npm run build && npm run test","typecheck":"tsc --noEmit","test:debug":"vitest --inspect-brk --run","test:watch":"vitest","release:check":"npm run typecheck && npm run build && npm run test","prepublishOnly":"npm run release:check"},"_npmUser":{"name":"ayapapa-npm","email":"maas.daon@gmail.com"},"_npmVersion":"12.0.1","description":"A lightweight date and time formatter for JavaScript designed for log and console output, with specifications based on C# formatting rules.","directories":{},"_nodeVersion":"24.15.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.10","typescript":"^5.9.3","@types/node":"^26.2.0"},"_npmOperationalInternal":{"tmp":"tmp/date-formatter-js_0.1.0_1786430714737_0.32604666923929293","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@ayapapa-npm/date-formatter-js","version":"0.1.1","author":{"name":"ayapapa"},"license":"MIT","_id":"@ayapapa-npm/date-formatter-js@0.1.1","maintainers":[{"name":"ayapapa-npm","email":"maas.daon@gmail.com"}],"dist":{"shasum":"dac97319b61ce5c14fbbb1bc7744204277e8e56e","tarball":"https://registry.npmjs.org/@ayapapa-npm/date-formatter-js/-/date-formatter-js-0.1.1.tgz","fileCount":7,"integrity":"sha512-gAvpFL/R6ItqNhtTdJ99CEEq9f6sb5wh7swESWArjVJd3LxLOJAFJHvVNXE0RtPuvoOjUyifRrnLRq5Mth4Wuw==","signatures":[{"sig":"MEUCIQCr6bpZpITL4PnDsSkPp27MptNX48qzIj77h7iWS2hPnwIgaPDWkLJ4HTKsg+106XkT28hYCpRfuj/VWNeBv3gZI94=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13882},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"bc54b74768a93751ea51e6e88fbb8f34e766cd07","scripts":{"test":"vitest run","build":"tsup src/index.ts --format esm,cjs --out-dir dist --clean --dts","check":"npm run typecheck && npm run build && npm run test","typecheck":"tsc --noEmit","test:debug":"vitest --inspect-brk --run","test:watch":"vitest","release:check":"npm run typecheck && npm run build && npm run test","prepublishOnly":"npm run release:check"},"_npmUser":{"name":"ayapapa-npm","email":"maas.daon@gmail.com"},"_npmVersion":"12.0.1","description":"A lightweight date and time formatter for JavaScript designed for log and console output, with specifications based on C# formatting rules.","directories":{},"_nodeVersion":"24.15.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.10","typescript":"^5.9.3","@types/node":"^26.2.0"},"_npmOperationalInternal":{"tmp":"tmp/date-formatter-js_0.1.1_1786430976949_0.7396896806212729","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@ayapapa-npm/date-formatter-js","version":"0.1.2","description":"A lightweight date and time formatter for JavaScript designed for log and console output, with specifications based on C# formatting rules.","license":"MIT","author":{"name":"ayapapa"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format esm,cjs --out-dir dist --clean --dts","typecheck":"tsc --noEmit","test":"vitest run","test:debug":"vitest --inspect-brk --run","test:watch":"vitest","check":"npm run typecheck && npm run build && npm run test","release:check":"npm run typecheck && npm run build && npm run test","prepublishOnly":"npm run release:check"},"devDependencies":{"@types/node":"^26.2.0","tsup":"^8.5.1","typescript":"^5.9.3","vitest":"^4.1.10"},"gitHead":"908d4ec258dd83b0479e4769456d88b1d26af591","types":"./dist/index.d.ts","_id":"@ayapapa-npm/date-formatter-js@0.1.2","_nodeVersion":"24.15.0","_npmVersion":"12.0.1","dist":{"integrity":"sha512-gCm4zu8N53XImnkQ1UhaiC7dtECHXlWdeds+xOD8iYT0obTzMEejnW4o6FW2fAjuzPSR7EpmZzpg1Wn+9947Kg==","shasum":"dce4b8c630b478bac2c640bfba939cfa93963510","tarball":"https://registry.npmjs.org/@ayapapa-npm/date-formatter-js/-/date-formatter-js-0.1.2.tgz","fileCount":7,"unpackedSize":14043,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICMRp6iwnC1pycxitv0ynUh642lQv9TRlXWFQPd4fe6OAiBj619VM+V+EqlkPtCDBDIb8upMRUvAR/jvHrT4TecWqg=="}]},"_npmUser":{"name":"ayapapa-npm","email":"maas.daon@gmail.com"},"directories":{},"maintainers":[{"name":"ayapapa-npm","email":"maas.daon@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/date-formatter-js_0.1.2_1786502599946_0.22076770685503933"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-11T06:45:14.559Z","modified":"2026-08-12T02:43:20.222Z","0.1.0":"2026-08-11T06:45:14.892Z","0.1.1":"2026-08-11T06:49:37.091Z","0.1.2":"2026-08-12T02:43:20.091Z"},"author":{"name":"ayapapa"},"license":"MIT","description":"A lightweight date and time formatter for JavaScript designed for log and console output, with specifications based on C# formatting rules.","maintainers":[{"name":"ayapapa-npm","email":"maas.daon@gmail.com"}],"readme":"[![CI](https://github.com/ayapapa/date-formatter-js/actions/workflows/ci.yml/badge.svg)](https://github.com/ayapapa/date-formatter-js/actions/workflows/ci.yml)\r\n# date-formatter-js\r\nA lightweight date and time formatter designed for log and console output. \r\nThe formatting specifications are inspired by C# Custom Date and Time Format Strings.\r\n\r\n## Installation\r\n```bash\r\nnpm install @ayapapa-npm/date-formatter-js\r\n```\r\n## Interface\r\nDateFormatter.format(date: Date = new Date(), pattern: string = \"yyyy/MM/dd HH:mm:ss.fff\");\r\n\r\n## Pattern specification element\r\n| Token  | Meaning                 |\r\n| ------ | ----------------------- |\r\n| `yyyy` | 4-digit year            |\r\n| `yy`   | 2-digit year            |\r\n| `MM`   | 2-digit month           |\r\n| `M`    | month                   |\r\n| `dd`   | 2-digit day             |\r\n| `d`    | day                     |\r\n| `HH`   | 2-digit hour (24-hour)  |\r\n| `H`    | hour (24-hour)          |\r\n| `mm`   | 2-digit minute          |\r\n| `m`    | minute                  |\r\n| `ss`   | 2-digit second          |\r\n| `s`    | second                  |\r\n| `fff`  | milliseconds (3 digits) |\r\n| `ff`   | milliseconds (2 digits) |\r\n| `f`    | milliseconds (1 digit)  |\r\n\r\n## Usage\r\n\r\n```ts\r\nimport { DateFormatter } from '@ayapapa-npm/date-formatter-js';\r\n\r\nfunction outputDate(date: Date): void {\r\n  const pattern: string = \"yyyy/MM/dd HH:mm:ss.fff\";\r\n  const datetimeStr: string = DateFormatter.format(\r\n    date,\r\n    pattern\r\n  );\r\n  console.log('Datetime:', datetimeStr);\r\n}\r\n\r\nfunction main(): void {\r\n  outputDate(new Date(2026, 7, 11, 12, 34, 56, 789)); // Datetime: \"2026/08/11 12:34:56.789\"\r\n}\r\n```\r\n","readmeFilename":"README.md"}