date-fns
⏳ Modern JavaScript date utility library ⌛️ (by date-fns)
Luxon
⏱ A library for working with dates and times in JS (by moment)
Our great sponsors
- SurveyJS - A Non-Cloud Alternative to Google Forms that has it all.
- Amplication - open-source Node.js backend code generator
- Appwrite - The open-source backend cloud platform
- InfluxDB - Collect and Analyze Billions of Data Points in Real Time
- Sonar - Write Clean JavaScript Code. Always.
- Mergify - Updating dependencies is time-consuming.
date-fns | Luxon | |
---|---|---|
110 | 27 | |
32,311 | 14,266 | |
1.2% | 1.3% | |
5.4 | 8.2 | |
6 days ago | 8 days ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
date-fns
Posts with mentions or reviews of date-fns.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-06-09.
-
What library do you use to handle dates?
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.
-
20 Essential Parts Of Any Large Scale React App
date-fns : Date handling
-
Launching my first Expo app 🥳
Thanks! I used date-fns for the calendar
-
What big media wants us to think.
I've used this before and I like it more
-
Common Date formatter libraries in React (TypeScript)
The default date constructor does a really great job at parsing in most cases and things like addition/subtraction along with many other common operations are usually just simple math. If you really want to abstract that use date-fns where most date operations are tree shakable to be left with just a few lines of code.
-
What is your must have npm package on any given project?
date-fns and mitt (event emitter) are also frequent helpers, but I'm considering dayjs and nanoevents for these cases.
- I literally wouldn't even, even if i could, y'all.
-
Everything you need to know about Temporal Date API
We all know the pain of working with dates in Javascript. It needs to be more explicit, has almost no method, and could not be more clunky. For example, to create the Date January 1, 2023, you have to write a new Date (2023, 0, 1), which can be confusing for beginners, and overall just not that clear. And because of these reasons, the community has made many libraries that attempt to make Date easier to work with over the past years. Like momentjs or Date-fns. But the good news is that you won't need these third-party libraries any longer. The Temporal Date API in Javascript attempts to completely replace the Date object and fix all of the issues we generally face when working with dates.
-
Building a real-time commenting app with Socket.io and React
Next we're going to install any additional dependencies we need. In our case, we're just going to need date-fns which is a library that makes it trivial to work with datetimes in JavaScript.
-
Buddy got sick of unpredictable date calculations with JavaScript Date() objects
Obligatory plug for date-fns. https://date-fns.org/
Luxon
Posts with mentions or reviews of Luxon.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-06-09.
-
What library do you use to handle dates?
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.
-
Googling be like
Pain
-
23 of the best Eleventy Themes (Starters) for 2023
Eleventyone’s project scaffold includes: Eleventy with a skeleton site, a date format filter for Nunjucks based on Luxon, a tiny CSS pipeline with PostCSS, an equally tiny inline JS pipeline, JS search index generator, Netlify Dev for testing Netlify redirects, and a serverless (FaaS) development pipeline with Netlify Dev and Netlify Functions.
-
Effortlessly handle dates and times in JavaScript with Luxon
Alternatively, you can download the latest version from the GitHub releases page and include it in your project manually (but you really shouldn't)
Luxon is a powerful and lightweight JavaScript library for working with dates and times. It was created as an alternative to the popular Moment.js library, with the goal of being faster, smaller, and easier to use.
-
Day.js Fast 2kB alternative to Moment.js with the same modern API
But how does this compare to Luxon? (https://moment.github.io/luxon/#/why)
- converting seconds to human readable form
-
Get good Git info from Eleventy, too
Note that gitinfo.js assumes you have installed the luxon package, to be used here for formatting dates from Git commit data. (On the other hand, child_process is included in Node.js.) Notice also that you’ll have to supply, in the repoLink variable, the URL for your online repo’s commits.
-
Is there any risk of moment.js breaking under future releases of node.js?
if you are starting a new project then i would recommend luxon (recommended by momentjs) https://www.npmjs.com/package/luxon
-
Best internationalization for Gatsby
Now, let’s check out how we can use different date formats with the help of i18next and Luxon to handle date and time.
What are some alternatives?
When comparing date-fns and Luxon you can also consider the following projects:
dayjs - ⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
countdown.js - Super simple countdowns.
moment - Parse, validate, manipulate, and display dates in javascript.
moment-timezone - Timezone support for moment.js
timeago.js - :clock8: :hourglass: timeago.js is a tiny(2.0 kb) library used to format date with `*** time ago` statement.
js-joda - :clock2: Immutable date and time library for javascript
fecha - Lightweight and simple JS date formatting and parsing