JavaScript Date-Time Library
48.6k 2026-05-07
iamkun/dayjs
A minimalist, 2KB immutable JavaScript library providing a Moment.js-compatible API for parsing, validating, manipulating, and displaying dates and times.
Core Features
Moment.js-compatible API
2KB lightweight and immutable
Chainable operations
Internationalization (I18n) and Plugin support
Supports all modern browsers
Quick Start
npm install dayjs --saveDetailed Introduction
Day.js is a highly efficient and minimalist JavaScript library designed for handling dates and times. It offers a modern, largely Moment.js-compatible API, making it an ideal lightweight alternative for developers familiar with Moment.js. With a tiny footprint of just 2KB, Day.js provides robust functionalities for parsing, validating, manipulating, and displaying date-time information. Its immutable nature, chainable methods, extensive internationalization support, and flexible plugin system make it a powerful yet performant choice for modern web development across all browsers.