Github url

date-fns

by date-fns

date-fns /date-fns

⏳ Modern JavaScript date utility library βŒ›οΈ

23.1K Stars 1.0K Forks Last release: 28 days ago (v2.15.0) Other 1.4K Commits 166 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

date-fns

πŸ”₯πŸ”₯πŸ”₯ date-fns v2 is out! πŸ”₯πŸ”₯πŸ”₯

⭐️ Upgrading from v1 to v2?

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

date-fns is like lodash for dates. It has 180+ functions for all occasions.

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.

JavaScript jobs by date-fns

πŸ‘‹ Know someone who's looking for JavaScript devs? Recommend us a job!

βœ‰οΈ Get jobs worth sharing to your email! Subscribe to the newsletter.

License

MIT Β© Sasha Koss

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.