# iamkun/dayjs

⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API

Repository: https://github.com/iamkun/dayjs
Canonical: https://ross.abutalabs.com/products/dayjs
Homepage: https://day.js.org
Language: JavaScript
License: MIT
License Family: permissive
Topics: time, date, date-formatting, datetime, moment, dayjs
Last push: 2026-08-18T04:15:17+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 98, longevity 100
- inputs: {"age_days": 3067, "days_push": 15, "days_rel": 16, "gap_med": 1, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 48664, forks 2467 (observed 2026-08-28T04:12:11.495014+00:00)

## What it is
Day.js is a minimalist 2kB immutable JavaScript date-time library for parsing, validating, manipulating, and formatting dates and times. It offers a largely Moment.js-compatible API, making it a drop-in lightweight replacement for Moment.js.

## Use cases
- format dates and times in javascript
- parse and validate date strings
- replace moment.js with a smaller library
- add or subtract days and months from dates
- internationalize date formatting
- get start of month or week in javascript

## When to choose
- you need a tiny (~2kB) date library for browser or Node.js
- you want Moment.js-compatible API with immutability
- bundle size matters in a frontend project

## When to avoid
- you need advanced timezone handling without adding plugins
- you prefer a modern native Intl/Temporal-based approach
- you need calendar-aware recurring events out of the box

## Facets
- artifact type: library
- maturity: stable
- function: date-time, internationalization, parser
- domain: web-development, frontend, developer-tools
- platform: browser, cross-platform
- tags: date-formatting, momentjs-alternative, immutable, 2kb, time-manipulation, timezone, localization, nodejs, javascript

## Member repositories
- iamkun/dayjs (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:12:11.495014+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:20:37.159007+00:00, confidence not recorded.
  - readme: https://github.com/iamkun/dayjs (fetched 2026-08-28T04:12:11.495014+00:00, sha 24f958a6e8ee)
  - homepage: https://day.js.org (fetched 2026-08-29T07:41:58.503709+00:00, sha 2b97a9e3be29)
  - site_page: https://day.js.org/docs/en/installation/installation (fetched 2026-08-29T07:41:58.513281+00:00, sha 02dd64a743e6)
  - registry_npm: https://registry.npmjs.org/dayjs (fetched 2026-08-29T07:41:58.515302+00:00, sha 5b1c712f9c53)
- Data as of 2026-08-30T08:39:29.467469+00:00.
