lit-date

JSON →
library 1.0.5 ·javascript
verified Jun 4, 2026

Lit-date is a lightweight (~1kB gzipped) and fast datetime formatter for modern browsers, using template literals for formatting. Version 1.0.5 is the current stable release. Unlike moment.js or date-fns, it uses tagged template literals (e.g., litdate`${'YYYY'}/${'MM'}/${'DD'}`(date)) and supports internationalization via custom functions. It is significantly faster than Moment.js and Day.js based on benchmarks. The library ships TypeScript types and supports both Node.js and browser environments via ESM or UMD bundles.