date-fns vs Day.js
In 4,818 JavaScript/TypeScript projects set up for AI coding agents, date-fns is a dependency in 647 (13.4%) and Day.js in 91 (1.9%): date-fns is 7.1× as common. Among repos created in the last 90 days that use a utilities tool, date-fns is in 11.7% and Day.js in 3.9%, against 30.9% and 4.2% of older ones. 21 projects list both, often a sign of a migration or of a monorepo with several apps.
Utilities npm Updated Oct 20, 2026
Side by side
| date-fns | Day.js | |
|---|---|---|
| Agent projects that use it | 647 | 91 |
| Rank in utilities | #2 | #12 |
| In new repos with a utilities tool (last 90 days) | 11.7% | 3.9% |
| In older repos with one | 30.9% | 4.2% |
| Downloads, last 7 days | 56M | 44.3M |
| GitHub stars | 36.6K | 48.7K |
| Last push to its repo | Sep 22, 2026 | Sep 15, 2026 |
| License | MIT | MIT |
| Funding | Yes | Yes |
| Projects that list both | 21 | |
Downloads include CI runs and installs as a dependency of other packages. Stars and pushes are from GitHub's API; downloads from npm.
By coding agent
| Projects set up for | JavaScript/TypeScript repos | date-fns | Day.js |
|---|---|---|---|
| Claude Code | 2,580 | 12.5% | 1.8% |
| GitHub Copilot | 2,339 | 11.9% | 2.4% |
| Cursor | 1,987 | 18.3% | 2.2% |
| Gemini CLI | 416 | 10.8% | 3.4% |
| OpenAI Codex | 399 | 9.3% | 2.8% |
| OpenCode | 295 | 7.8% | 2.7% |
| OpenClaw | 226 | 6.6% | 0% |
| Devin Desktop | 228 | 18.0% | 0% |
| Kiro | 125 | 18.4% | 0% |
| Roo-Code | 90 | 18.9% | 0% |
Share of the JavaScript/TypeScript repos configured for each agent (its config file in the repo) that list the tool. A repo set up for two agents counts for both.
date-fns
Modern JavaScript date utility library with comprehensive formatting functions.
Most often used with it:
| Lucide React | 82.7% of its projects |
|---|---|
| clsx | 81.3% of its projects |
| Tailwind Merge | 79.6% of its projects |
| Class Variance Authority | 76.2% of its projects |
| Radix UI | 70.2% of its projects |
npm install date-fns
Day.js
2KB immutable date/time library with modern API as lightweight Moment.js alternative.
Most often used with it:
| ESLint | 81.3% of its projects |
|---|---|
| Tailwind CSS | 74.7% of its projects |
| Vite | 57.1% of its projects |
| TypeScript | 91.2% of its projects |
| Axios | 37.4% of its projects |
npm install dayjs
More matchups
How we count
Projects are public GitHub repos our weekly scan finds through coding-agent config files (CLAUDE.md, AGENTS.md, .cursor/mcp.json and others); a project uses a tool when its package.json, requirements.txt or pyproject.toml lists it. "Same job" was checked for every pair, so add-ons and companions are never paired. Shares by repo age compare repos created in the last 90 days with older ones in the same scan. More on the method.