A lightweight JavaScript date formatting library that extends Date.prototype.format and provides a standalone formatter function. Current stable version is 1.2.2; no active release cadence observed—last updated in 2016. Key differentiators include a compact API, support for both CJS and browser script inclusion, and simple format tokens similar to PHP date. However, it is unmaintained and lacks TypeScript definitions, ESM support, and timezone handling beyond UTC.
npm install node.date-timeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates standalone format function and Date.prototype.format usage with format tokens and UTC flag.
Migrate to a modern alternative like date-fns, dayjs, or luxon.
Refer to documentation for token mapping; consider using ISO 8601 or well-known formats.
Add declare module 'node.date-time' or switch to typed library.
Use standalone format function to avoid prototype pollution or isolate the require.
Use const format = require('node.date-time'); instead of import.Call new Date().format() not Date.format().
Add a declaration file: declare module 'node.date-time' { function format(fmt: string, date?: Date, utc?: boolean): string; export = format; }No dependency data recorded yet.