When I'm asked to handle dates, I just quit and find a job elsewhere. Answer from robby_arctor on reddit.com
🌐
GitHub
github.com › iamkun › dayjs › issues › 1235
Why is this package so much smaller than the alternatives? · Issue #1235 · iamkun/dayjs
November 21, 2020 - https://github.com/you-dont-need/You-Dont-Need-Momentjs#brief-comparison It's several times smaller than all other alternatives (even those with tree-shaking) and seems to be as feature-rich as oth...
Published   Nov 21, 2020
🌐
DhiWise
dhiwise.com › post › date-fns-vs-dayjs-the-battle-of-javascript-date-libraries
Date fns vs. Dayjs: A Developer's Guide to Making the Right Choice
March 22, 2024 - Both date-fns and dayjs support this feature, which is vital for maintaining a small bundle size and improving web applications' performance. By only including the code used, tree shaking significantly reduces the size of the final JavaScript bundle. This leads to faster load times and a better user experience. Programming is notoriously difficult when dealing with timezones. While Moment Timezone offers comprehensive timezone support, both date-fns and dayjs provide solutions that cater to the most common timezone-related needs.
Discussions

What library do you use to handle dates?
When I'm asked to handle dates, I just quit and find a job elsewhere. More on reddit.com
🌐 r/reactjs
86
30
June 9, 2023
Would you recommend using moment.js for working with dates & times
I like dayjs More on reddit.com
🌐 r/reactjs
48
0
October 8, 2024
What’s your favorite date package?
For me. it's got to be date-fns. Works off of typical JavaScript Date objects, and lots of handy utility functions. https://date-fns.org/ More on reddit.com
🌐 r/node
62
55
April 1, 2024
Is there any DateJs alternative out there?
https://date-fns.org/ More on reddit.com
🌐 r/reactjs
35
35
April 19, 2024
🌐
npm Trends
npmtrends.com › date-fns-vs-dayjs
date-fns vs dayjs | npm trends
Comparing trends for date-fns 4.1.0 which has 40,763,148 weekly downloads and 36,338 GitHub stars vs. dayjs 1.11.19 which has 32,869,396 weekly downloads and 48,432 GitHub stars.
🌐
GitHub
github.com › shadcn-ui › ui › discussions › 4817
date-fns vs dayjs? · shadcn-ui/ui · Discussion #4817
According to npm the unpacked size for each is, 22.2 MB for date-fns and 670 kB for dayjs. date-fns exports one function per file, this structure makes it tree-shakable, and bundlers will only include the code you import resulting in a much smaller final bundle size for the client.
Author   shadcn-ui
🌐
npm Trends
npmtrends.com › date-fns-vs-day-vs-dayjs-vs-moment
date-fns vs day vs dayjs vs moment | npm trends
Comparing trends for date-fns 4.1.0 which has 34,797,549 weekly downloads and 36,310 GitHub stars vs. day 0.0.2 which has 279 weekly downloads and 0 GitHub stars vs. dayjs 1.11.19 which has 28,912,190 weekly downloads and 48,397 GitHub stars vs. moment 2.30.1 which has 25,814,106 weekly downloads and 48,091 GitHub stars.
🌐
DEV Community
dev.to › dmtrkovalenko › you-might-not-need-date-fns-23f7
You might not need date-fns - DEV Community
May 10, 2021 - Yes, date-fns is really fast because it works directly with a native date without creating any additional wrapper. Dayjs focused on size instead of speed and Luxon is using Intl which is super slow 🐌.
🌐
How-To
how-to.dev › dayjs-vs-date-fns
Day.js vs date-fns
August 7, 2021 - I would go with date-fns for projects where I'm very build-size-conscious, and I can manage without a fully flexible format function. Day.js is for sure a good migration option for projects that are using Moment.js. The only downside is that we have to pay attention to all the plugins we need to import to ensure all works as expected.
Find elsewhere
🌐
Reddit
reddit.com › r/reactjs › what library do you use to handle dates?
r/reactjs on Reddit: What library do you use to handle dates?
June 9, 2023 -

Hi guys, I have to work with dates, for example I have to check if they are valid, I have to format them and to check if a date is greater than another one.

In past i used Moment, but I read that we should avoid to use it for future projects. I read someone suggested to use Datejs, but it doesn't seems to be updated, last time was 8 years ago. Currently I'm thinking to use Luxon but I someone suggest Date-fns also.

What library are you using and do you recommend me?

🌐
GitHub
github.com › you-dont-need › You-Dont-Need-Momentjs › blob › master › README.md
You-Dont-Need-Momentjs/README.md at master · you-dont-need/You-Dont-Need-Momentjs
If you are not using timezone but only a few simple functions from moment.js, this might bloat your app, and therefore is considered overkill. dayjs has a smaller core and has very similar APIs so it makes it very easy to migrate. date-fns enables ...
Author   you-dont-need
🌐
Medium
medium.com › @celayirbedirhan › easily-work-with-dates-in-javascript-using-dayjs-and-comparision-with-date-fns-3dffa7071b63
Easily Work with Dates in JavaScript using dayjs and comparision with date-fns | by Bedirhan Celayir | Medium
April 17, 2023 - Easily Work with Dates in JavaScript using dayjs and comparision with date-fns JavaScript provides a built-in Date object that allows developers to work with dates and times. With the Date object …
🌐
Reddit
reddit.com › r/reactjs › would you recommend using moment.js for working with dates & times
Would you recommend using moment.js for working with dates & times : r/reactjs
October 8, 2024 - Nope. For new project use dayjs if you want to have same API as momentjs ... I know a lot of people like date-fns, but it still uses Date, which I find to be a horribly designed type:
🌐
SaaSHub
saashub.com › home › javascript ui libraries › web frameworks
date-fns VS Day.js - compare differences & reviews?
Date-fns is considered a good library because it offers over 200 functions for manipulating JavaScript dates in a consistent and reliable manner. It focuses on immutability and provides a functional approach to date manipulation, which can help avoid common pitfalls associated with mutable objects.
🌐
Medium
medium.com › hackernoon › why-you-should-choose-date-fns-over-moment-js-in-your-nodejs-applications-116d1a709c43
Why you should choose date-fns over moment.js in your nodeJs applications
March 2, 2018 - Why you should choose date-fns over moment.js in your nodeJs applications It’s simple: Targeted Module Imports Link up: Modern JavaScript Date Utility Library date-fns provides the most …
🌐
NPM Compare
npm-compare.com › date-fns,dayjs,luxon,moment › add
date-fns vs dayjs vs luxon | JavaScript Date Manipulation ...
Comprehensive comparison of date-fns, dayjs, moment, luxon npm packages, including features, npm download trends, ecosystem, popularity, and performance.
🌐
CodePen
codepen.io › dciesielkiewicz › pen › gOYvZRv
DayJs vs Native Date Performance
1 : 0; } } isWithinThirtyDays (data, useDayJs, today, thirtyDays) { if (useDayJs) { return this.isBetween(dayjs(data.date), today, thirtyDays) } else { const day = new Date(data.date).getTime(); return day > today.getTime() && day < thirtyDays.getTime(); } } isBetween(date, dateStart, dateEnd, includeStart = false, includeEnd = false) { let result = date.isAfter(dateStart) && date.isBefore(dateEnd); if (!result && includeStart) result = date.isSame(dateStart); if (!result && includeEnd) result = date.isSame(dateEnd); return result; } processDataset (processName, dataSet, useDayJs = true) { const tA = performance.now(); const today = useDayJs ?
🌐
DEV Community
dev.to › e78230c36501509 › comment › 2lhd9
difference between dayjs and date-fns: npm-compare.com/date-fns,dayjs/#ti... - DEV Community
February 6, 2025 - difference between dayjs and date-fns: npm-compare.com/date-fns,dayjs/#ti... For further actions, you may consider blocking this person and/or reporting abuse · We're a place where coders share, stay up-to-date and grow their careers.
🌐
NPM Compare
npm-compare.com › date-fns,luxon,moment-timezone,dayjs
date-fns vs dayjs vs luxon vs moment-timezone
Looking for similar npm packages? Use Npm Compare (npm-compare.com) to compare package features, popularity, npm trends, and discover alternatives.
🌐
OpenReplay
blog.openreplay.com › working-with-dates-and-times-with-day-js
Working with Dates and Times with Day.js
September 14, 2022 - The code below will return the date in the desired format, so let’s test it out. Always remember that a plugin is necessary if you want additional Day.js functionality. dayjs().format('a') // am dayjs().format('A') // AM // @ The offset from UTC, ±HHmm dayjs().format('ZZ') // +0100 // @ The millisecond, 3-digits dayjs().format('SSS') // 912 dayjs().format('h:mm A ') // 8:28 AM dayjs().format('h:mm:ss A') // 8:30:51 AM dayjs().format('MM/DD/YYYY') // 08/19/2022 dayjs().format('M/D/YYYY') // 8/19/2022 dayjs().format('ddd, hA') // Output: "Fri, 8AM" dayjs().format('MMM D, YYYY') // Aug 19, 2022
🌐
NPM Compare
npm-compare.com › date-fns,dayjs,moment
date-fns vs dayjs vs moment | Date and Time Manipulation
These libraries help streamline date-related operations, improve code readability, and enhance overall productivity in web development. dayjs is a lightweight, modern library focusing on modularity and performance, while moment is a feature-rich, legacy library that offers comprehensive date-time ...