About Dayjs
Day.js is a minimalist JavaScript date library for modern browsers. It parses, validates, manipulates and displays dates and times, and weighs about 2kB, which the project presents as less JavaScript to download, parse and execute.
Its API is largely compatible with Moment.js, so people who already use Moment.js are expected to find it familiar. Every operation that changes a Day.js object returns a new instance, which avoids a class of bugs caused by shared mutable dates.
Internationalization is supported, and locales are only included in a build when you use them. The site mentions plugins for extra features, lists translations in several languages, and the project is MIT-licensed.
The documentation is available in English, Chinese, Russian and Spanish, with a call for help translating it. The homepage also lists sponsors, and community links point to GitHub and Gitter. A Get Started button leads to the docs, where the API and plugin list can be found.
Key features
- About 2kB in size
- Parses, validates, manipulates and displays dates
- Largely Moment.js-compatible API
- Immutable objects
- Locales included only when used
Good fit for
- Formatting dates in the browser
- Replacing Moment.js
- Localized date display
Dayjs: questions and answers
- What is Dayjs used for?
- Dayjs is a 2kB JavaScript library for parsing, validating, manipulating and displaying dates, with an API largely compatible with Moment.js. It is a good fit for formatting dates in the browser, replacing Moment.js and localized date display.
- Is Dayjs open source?
- Yes. Dayjs is open source under the MIT licence. Its source code is on GitHub at iamkun/dayjs and is written mainly in JavaScript.
- Is Dayjs free?
- Yes. Dayjs is open source, so the software itself is free to use.
- Can I self-host Dayjs?
- Yes. Dayjs can be self-hosted on your own server or infrastructure.
- Is Dayjs actively maintained?
- Yes. The most recent commit to Dayjs was on 6 November 2026, and the latest release is v1.11.23, published on 17 August 2026. The project has 49k stars on GitHub.

