date-fns 0,1,1,0,2,0,2 editorconfig flowtype travis-ci Bower npm

⏳ Modern JavaScript date utility library ⌛️

date-fns

Pinned: see a brief comparison with Moment.js.

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 140+ functions for all occasions.

dateFns.format(new Date(2014, 1, 11), 'MM/DD/YYYY')
//=> '02/11/2014'

var dates = [new Date(1995, 6, 2), new Date(1987, 1, 11), new Date(1989, 6, 10)]
dates.sort(dateFns.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, a Bower package. To install a package run:

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

Also, you can simply download the library from the releases page.

Docs

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

License

MIT © Sasha Koss

Related Repositories

frontend-stuff

frontend-stuff

A continuously expanded list of framework/libraries and tools I used/want to use ...

clojure-style-guide

clojure-style-guide

A community coding style guide for the Clojure programming language ...

react-infinite-calendar

react-infinite-calendar

✨ Infinite scrolling date-picker built with React, with localization, range sele ...

graphql-directive

graphql-directive

Use custom directives in your GraphQL schema and queries ...

annotate

annotate

...


Top Contributors

kossnocorp LeshaKoss dolbyzerr paraboom JohnyDays nkabardin sidonath hosmelq just-boris mj1856 mkaschenko

Dependencies

package version
dev babel ^6.5.2
babel-cli ^6.6.5
babel-eslint ^7.1.1
babel-loader ^6.2.8
babel-plugin-add-module-exports ^0.2.1
babel-preset-es2015 ^6.6.0
babel-preset-power-assert ^1.0.0
cloc ^2.2.0
firebase ^3.7.1
flow-bin ^0.36.0
fs-promise ^1.0.0
glob-promise ^2.0.0
gzip-size-cli ^1.0.0
js-beautify ^1.5.10
jsdoc-to-markdown leshakoss/jsdoc-to-markdown
json-loader ^0.5.3
karma ^1.3.0
karma-benchmark ^0.6.0
karma-benchmark-reporter ^0.1.1
karma-chrome-launcher ^2.0.0
karma-cli ^1.0.1
karma-es5-shim 0.0.4
karma-mocha ^1.3.0
karma-mocha-reporter ^2.2.1
karma-phantomjs-launcher ^1.0.4
karma-sauce-launcher ^0.3.0
karma-sinon ^1.0.4
karma-sourcemap-loader ^0.3.5
karma-webpack ^1.7.0
lodash.clonedeep ^4.5.0
mocha ^3.2.0
moment ^2.17.1
node-fetch ^1.3.3
power-assert ^1.3.1
sinon ^1.17.3
snazzy ^5.0.0
standard ^8.6.0
systemjs ^0.19.39
systemjs-plugin-babel 0.0.17
uglify-js ^2.6.1
webpack ^1.12.0
world-countries ^1.8.1

Releases

-   v1.3.0 zip tar
-   v1.2.0 zip tar
-   v1.1.1 zip tar
-   v1.1.0 zip tar
-   v1.0.0 zip tar
-   v1.0.0-rc22 zip tar
-   v1.0.0-rc21 zip tar
-   v1.0.0-rc20 zip tar
-   v1.0.0-rc19 zip tar
-   v1.0.0-rc18 zip tar
-   v1.0.0-rc17 zip tar
-   v1.0.0-rc16 zip tar
-   v1.0.0-rc15 zip tar
-   v1.0.0-rc14 zip tar
-   v1.0.0-rc13 zip tar
-   v1.0.0-rc12 zip tar
-   v1.0.0-rc11 zip tar
-   v1.0.0-rc10 zip tar
-   v1.0.0-rc9 zip tar
-   v1.0.0-rc8 zip tar
-   v1.0.0-rc7 zip tar
-   v1.0.0-rc6 zip tar
-   v1.0.0-rc5 zip tar
-   v1.0.0-rc4 zip tar
-   v1.0.0-rc3 zip tar
-   v1.0.0-rc2 zip tar
-   v1.0.0-rc1 zip tar
-   v1.0.0-alpha4 zip tar
-   v1.0.0-alpha3 zip tar
-   v1.0.0-alpha2 zip tar