Antoni Kępiński github.com

Fast & lightweight (157 bytes) date formatting for Node and the browser  ↦

After searching for a fast and lightweight universal date formatting library, I’ve decided to create my own! I managed to include the most common features in just 157 bytes. The thing is also more than 2 times faster than Moment’s format and 3,5 times faster than date-fns lightFormat. 😃

Formatting patterns are compliant with Unicode Technical Standard #35.

While only a basic set of features is included with the format function, I added an additional localeFormat for locale-based formatting (such as month names). I’m planning on extending the package in the future to potentially include string escape mechanism and time-zone formatting.


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00