HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
iamkun
dayjs
JavaScript2018–2024
iamkun / dayjs

dayjs

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

7Distinct people
9Mentions
0Explicit recommenders
48.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

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

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year9 dated mentions

Observed mentions: 2018-05-22 10:04:52 UTC to 2024-04-12 17:28:12 UTC.

0122018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC220
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC202
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC211

What Hacker News says

9 sources
As web developers, we heavily rely OSS packages. One popular example is Day.js, a JS lib for parsing, validating, manipulating, and formatting dates. It's a widely-used alternative to Moment, with over 17mil weekly downloads on npm. A critical bug was discovered in Day.js (see: https://github.com/iamkun/dayjs/pull/2118) causing incorrect date manipulation (add, subtract) when in UTC TZ. This could have severe implications for any project relying on Day.js for date-related functionality. However, the maintainer of the project appears to be unresponsive, leaving the bug unresolved and the future of the library uncertain. This raises some important questions for our community: - At what point should we consider a widely-used OSS project "abandoned" if the maintainer is unresponsive? - Is forking the project the best solution, or should we fi
Read the rest
rst try to reach out to the maintainer through other channels? - Are there established community guidelines around responsiveness expectations for widely-used OSS projects? - What are successful examples of community-driven forks or maintenance after a maintainer stepped away? I am very aware that many of these developers give their spare time for free for these projects, with little or no payment, and I am very thankful for all their work. This developer does get some money (a small amount?) through OpenCollective, and possibly also works for a company (in China?) that makes a UI library, which I think uses Day.js internally.
In Ask HN: The Day.js Dilemma: How Should We Handle OSS Maintainers Going MIA?
Welllll… “works right now” is perhaps an overly strong assertion when it comes to day.js. I was working on a library we use for parsing "schedules" (like, alarm turns on at 9:00pm on Thursday, and off again at 7:00am on Friday). I was doing things like computing the number of seconds until the next scheduled transition. I tried switching from moment to day.js, and my unit tests immediately failed. Within a couple of hours I’d opened two bugs [1][2], both related to incorrect behaviour in corner cases (like generating the incorrect date when near a daylight saving time transition). The fact that it only took me a few hours to find these suggests there are plenty more bugs like these to find. The fact that these bugs have been open since the start of March with no movement on them suggests they aren’t too interested in correct behaviou
Read the rest
r (or perhaps they’re just your typical under-staffed open source project). Maybe I just got super unlucky and ran into the only two bugs here… but it’s not likely. Luxon and moment.js both handled these cases perfectly. If you’re looking to move from whatever you’re using now, and you can’t wait for the new standard, I’d pick one of those. [1]: https://github.com/iamkun/dayjs/issues/1816 [2]: https://github.com/iamkun/dayjs/issues/1817
In Day.js – Fast 2kB alternative to Moment.js with the same modern API
the breakdown is not complete, for example I needed to pull in a new library to get the localized first day of the week with Luxon (this differs based on locale) Also I really don't recommend dayJS, its documentation is crap (for example this is the documentation of its timezone plugin: https://day.js.org/docs/en/plugin/timezone ) and is full of serious bugs that its developer does not respond to: https://github.com/iamkun/dayjs/issues Also the code style is really concerning too: https://github.com/iamkun/dayjs/issues/1598
In You may not need Moment.js
> So far there isn't much opensource written in China There are lots of opensource written in China. I think you have mistaken my stance on this. The Chinese open-source microcosmos are pretty cool. It's just that I have yet seen anything reactjs-great[1], let alone linux-great. Here are some github repos by the big players: Ant - https://github.com/ant-design TaroJS - https://github.com/NervJS Tencent - https://github.com/Tencent Baidu - https://github.com/PaddlePaddle ... There are also many pretty nice libraries written and maintained independently by devs (or small startups) in China. dayjs - https://github.com/iamkun/dayjs GPT2 in Chinese - https://github.com/Morizeyao/GPT2-Chinese Wechaty - https://github.com/wechaty vercel ssg - https://github.com/shuding/nextra ... [1]: For example, vuejs (https://github.com/vuejs/vue) is closed t
Read the rest
o being reactjs-great. It is by Evan You who is now New Jersey-based (though looks like he's quite involved in the Chinese tech scene which is pretty intriguing)
In China wants to build an open source ecosystem to rival GitHub

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.