Day.js
2KB immutable date/time library with modern API as lightweight Moment.js alternative.
Utilities npm MIT
Used in agent projects
158
1.2% of 12,697 public repos built with AI coding agents
Rank in utilities
#10 of 109
by use in those projects
Downloads
74.6M
npm, last 7 days, dayjs
GitHub stars
48.7K
last push Sep 15, 2026
How Day.js is used
Day.js is a dependency in 158 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (1.2%), #10 of 109 in utilities. The most used alternative there is clsx. Projects that use it most often also use ESLint (82.9%), Axios (43.7%), TypeScript (90.5%).
Often used with Day.js
| ESLint | 82.9% of Day.js projects · 2.2× more than average |
|---|---|
| Axios | 43.7% of Day.js projects · 4.4× more than average |
| TypeScript | 90.5% of Day.js projects · 1.6× more than average |
| Prettier | 48.7% of Day.js projects · 2.8× more than average |
| Tailwind CSS | 67.7% of Day.js projects · 1.9× more than average |
| React Hook Form | 29.1% of Day.js projects · 3.6× more than average |
| React | 65.8% of Day.js projects · 1.5× more than average |
| Emotion | 22.2% of Day.js projects · 8.5× more than average |
By coding agent
| GitHub Copilot | 1.8% of projects set up for it |
|---|---|
| Claude Code | 1.5% of projects set up for it |
| Cursor | 1.9% of projects set up for it |
| Gemini CLI | 3.4% of projects set up for it |
| OpenAI Codex | 2.7% of projects set up for it |
| OpenCode | 2.5% of projects set up for it |
Share of public repos configured for each agent that list Day.js as a dependency.
Install
| Package | npm install dayjs |
|---|---|
| Main stacks | TypeScript / JavaScript (74), Next.js (66), PHP (13), React Native / Expo (3) |
| Example projects | un-pany/v3-admin-vite, LeagueAkari/LeagueAkari, trypostit/trypost, Hyk260/PureChat, blockscout/frontend |
Alternatives to Day.js
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| clsx npm Tiny utility for conditionally constructing className strings. |
2,251 (17.7%) | 126M | 9,847 | MIT |
| date-fns npm Modern JavaScript date utility library with comprehensive formatting functions. |
1,079 (8.5%) | 97.6M | 36.6K | MIT |
| uuid npm Generate RFC9562 compliant UUIDs for unique identifiers in applications. |
454 (3.6%) | 296M | 15.3K | MIT |
| PyYAML pypi YAML parser and emitter for reading and writing YAML configuration files. |
385 (3.0%) | 239M | 2,954 | MIT |
| Lodash npm Modular utility library with methods for common programming tasks and data manipulation. |
269 (2.1%) | 162M | 61.4K | MIT |
| bn.js npm Big number library for handling arbitrary-precision integers in JavaScript. |
217 (1.7%) | 62.1M | 1,230 | MIT |
| python-dateutil pypi Extensions to Python's datetime module for advanced date and time manipulation. |
165 (1.3%) | 233M | 2,638 | Dual License |
| yaml npm JavaScript YAML parser and stringifier with full spec compliance. |
164 (1.3%) | 179M | 1,693 | ISC |