Date Fns

⏳ Modern JavaScript date utility library ⌛️
Alternatives To Date Fns
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Dayjs43,2255,3716,3092 days ago116August 12, 2022737mitJavaScript
⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
Date Fns31,61568,2808,1073 days ago179September 13, 2022578mitTypeScript
⏳ Modern JavaScript date utility library ⌛️
Awesome Falsehood20,728
13 days ago1cc0-1.0
😱 Falsehoods Programmers Believe in
Luxon13,9151,9361,90013 days ago130August 29, 2022126mitJavaScript
⏱ A library for working with dates and times in JS
Arrow8,3023,711888a month ago63January 27, 202297apache-2.0Python
🏹 Better dates & times for Python
Pickadate.js7,707
3 years ago285mitJavaScript
The mobile-friendly, responsive, and lightweight jQuery date & time input picker.
Datetools7,089
6632 years ago13September 28, 2017118mitObjective-C
Dates and times made easy in iOS
Pendulum5,44854031020 days ago52July 24, 2020245mitPython
Python datetimes made easy
Joda Time4,90331,2695,49914 days ago51August 25, 202243apache-2.0Java
Joda-Time is the widely used replacement for the Java date and time classes prior to Java SE 8.
Maya3,362149598 months ago24January 06, 201919mitPython
Datetimes for Humans™
Alternatives To Date Fns
Select To Compare


Alternative Project Comparisons
Readme

Warning: the current main represents v3 pre-release version of the library. See v2 branch.

If you're participating in hacktoberfest, please send your PRs to main.


date-fns

date-fns provides the most comprehensive, yet simple and consistent toolset
for manipulating JavaScript dates in a browser & Node.js.


It's like Lodash for dates

  • It has 200+ functions for all occasions.
  • Modular: Pick what you need. Works with webpack, Browserify, or Rollup and also supports tree-shaking.
  • Native dates: Uses existing native type. It doesn't extend core objects for safety's sake.
  • Immutable & Pure: Built using pure functions and always returns a new date instance.
  • TypeScript & Flow: Supports both Flow and TypeScript
  • I18n: Dozens of locales. Include only what you need.
  • and many more benefits
import { compareAsc, format } from 'date-fns'

format(new Date(2014, 1, 11), 'yyyy-MM-dd')
//=> '2014-02-11'

const dates = [
  new Date(1995, 6, 2),
  new Date(1987, 1, 11),
  new Date(1989, 6, 10),
]
dates.sort(compareAsc)
//=> [
//   Wed Feb 11 1987 00:00:00,
//   Mon Jul 10 1989 00:00:00,
//   Sun Jul 02 1995 00:00:00
// ]

The library is available as an npm package. To install the package run:

npm install date-fns --save
# or with yarn
yarn add date-fns

Docs

See date-fns.org for more details, API, and other docs.


License

MIT Sasha Koss

Popular Date Projects
Popular Time Projects
Popular Libraries Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Javascript
Typescript
Date
Time