# Moment.js vs Day.js: source lines of code compared

The Moment.js vs Day.js comparison on OctoCounts shows side-by-side source line counts for moment/moment and iamkun/dayjs, counted with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-09-16, moment/moment contains 83,831 total lines (74,483 code) across 454 files, while iamkun/dayjs contains 54,036 total lines (51,275 code) across 232 files as of 2026-09-16. moment/moment is about 1.5x the size of iamkun/dayjs by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [moment/moment](https://octocounts.com/github/moment/moment) | [iamkun/dayjs](https://octocounts.com/github/iamkun/dayjs) |
| --- | ---: | ---: |
| Files | 454 | 232 |
| Total lines | 83,831 | 54,036 |
| Code lines | 74,483 | 51,275 |
| Comment lines | 3,857 | 1,310 |
| Blank lines | 5,491 | 1,451 |
| Languages counted | 5 | 4 |

Top languages in moment/moment: JavaScript (93.2% of code), TypeScript (3.3% of code), YAML (3.0% of code). Top languages in iamkun/dayjs: JSON (83.0% of code), JavaScript (15.9% of code), TypeScript (1.1% of code). JavaScript, TypeScript, JSON, Markdown appear in both top language lists; YAML appears only in moment/moment's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. moment/moment was counted at ref 15b45d48a176312e8f34143c5a800090abf4787f (commit 15b45d48a176) on 2026-09-16; iamkun/dayjs was counted at ref 436bde0bcded312781cbe45dc2b0ef079a36d8e3 (commit 436bde0bcded) on 2026-09-16. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

moment/moment counts the Moment.js repository — the date library, its large bundled locale data, plugins, tests, and documentation. iamkun/dayjs counts the Day.js repository — the core date library with its plugin set, locales, and tests. Both counts are date-library source trees, but Moment's tree includes a much larger share of shipped locale and formatting data, as the per-language tables of the two reports show.

A large part of Moment's counted tree is locale data and the files that ship with the published package rather than core parsing logic — visible in its per-language table — so its total measures a library-plus-its-data, not just code.

Day.js's counted tree is organized around a minimal core plus optional plugins that users enable individually, so its total measures a deliberately split codebase; the two totals therefore describe different packaging strategies for the same category of library.

_Repository size here mostly reflects how much each project ships with — locales, plugins, and packaging — not runtime speed or API quality. Read the totals as a measure of shipped source, not of which date library suits a project._

Sources: [moment/moment repository (with bundled locales)](https://github.com/moment/moment) · [iamkun/dayjs repository](https://github.com/iamkun/dayjs). Statements verified 2026-09-16.

Evidence and next steps:

- [moment/moment SLOC report](https://octocounts.com/github/moment/moment)
- [iamkun/dayjs SLOC report](https://octocounts.com/github/iamkun/dayjs)
- [Compare moment/moment and iamkun/dayjs interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Fmoment%2Fmoment&right=https%3A%2F%2Fgithub.com%2Fiamkun%2Fdayjs)

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

## Compare FAQ

### Which has more lines of code, moment/moment or iamkun/dayjs?

moment/moment has more code: 74,483 code lines versus 51,275 for iamkun/dayjs, about 1.5x as much, based on cached OctoCounts reports as of 2026-09-16.

### Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for moment/moment, iamkun/dayjs, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. moment/moment was counted at ref 15b45d48a176312e8f34143c5a800090abf4787f (commit 15b45d48a176) on 2026-09-16; iamkun/dayjs was counted at ref 436bde0bcded312781cbe45dc2b0ef079a36d8e3 (commit 436bde0bcded) on 2026-09-16. See the counting methodology for ignored directories and analysis options.

### Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
