2.26.0 • Published 16 days ago

date-fns v2.26.0

Weekly downloads
9,909,350
License
MIT
Repository
github
Last release
16 days ago

📖  Documentation   |   🧑‍💻  JavaScript Jobs

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

listr-verbose-renderer@cypress/listr-verbose-rendererconcurrentlyraw-datepicker@modernmsg/slick-ui@heroku-cli/config@olympeio/core@olliecurtis/bpk-component-scrollable-calendar@oliverflecke/date-fns-generic@weirwoodai/parse-xbrl@jessjess/react-site-components@slithyme/react-set-datealgotia-test-packagedebug-righ-sheet@v9.group/toolkit-ts-react-nativehydesigner-coreng-event-calendar@dineshghule321/nebular@react-material-table/material-tablearhi-join-webblp-blogreact-gantt-diagram_testmaster-archive-common@bimenergy/be-format-utilswebapp-userdeprecated_cplus_common_libraryhui-vue-uihui-webdefi-finder-calculatornawadata-web-testingnew-mdx-content-climdx-content-clizawee-material-tabledeveloper-portal-libraryruntime-osmium@frago12/composition-portals@artibulles-cis/reactph7-jack@tomzio/brickuiimdashimdashboardmydashboardsayeeddashboardlukit@delijn/core@vilellaj/wet-umbrella@travelshift/webjaivanajaivana_dashboardplt_securitytui-componentswallace-runnerreact-date-range-next-freezequintype-acevlk-mob-apporders-apiharriet-uppcustom-table-kldjskljasdsmt-form-builder@miot-plugin/react-native-ui-kittenvuepress-theme-yehan@plarin/vendorcarbon-addons-boomerang-reactenuygun-datepicker@bdk-pixi/core@bdk-pixi/webweb-drcb-ui-test@cocolist/thumbprint-react@rentiohq/shared@webeetle-it/bee-thememelodi-datacf-storybookcaoliao-hook-bookshelf@allen0304/nebular@bartverbruggen/react-datepicker@hi-ui/hiui2fieldfirst-againchorus-componentshelp-systemiunify-offshore-backend-common@neggi/baseuicomponentsssprudencioscreencloud-app-error-componentsmaterial-table-2material-table-hotfix-for-initial-page-remote-datamaterial-table-initial-page-hotfixfrontend-application@acorns/web-componentsreact-native-vouchedta-tmr-tracker-fefondfoliolili-stocksnextjs-demoastrid-app@doctorlogic/compoenentsneon-migration@data-driven/componentshighstreet-studiofound-money-personalization
2.26.0

16 days ago

2.25.0

2 months ago

2.24.0

3 months ago

2.23.0

4 months ago

2.22.1

6 months ago

2.22.0

6 months ago

2.21.2

7 months ago

2.21.3

7 months ago

2.21.1

8 months ago

2.21.0

8 months ago

2.20.2

8 months ago

2.20.3

8 months ago

2.20.1

8 months ago

2.20.0

8 months ago

2.19.0

9 months ago

2.18.0

9 months ago

2.17.0

10 months ago

2.16.1

1 year ago

2.16.0

1 year ago

2.15.0

1 year ago

2.14.0

2 years ago

2.13.0

2 years ago

2.12.0

2 years ago

2.11.1

2 years ago

2.11.0

2 years ago

2.10.0

2 years ago

2.9.0

2 years ago

2.8.1

2 years ago

2.8.0

2 years ago

2.7.0

2 years ago

2.6.0

2 years ago

2.5.1

2 years ago

2.5.0

2 years ago

2.4.1

2 years ago

2.4.0

2 years ago

2.3.0

2 years ago

2.2.1

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

2.0.0-beta.5

2 years ago

2.0.0-beta.4

2 years ago

2.0.0-beta.3

2 years ago

2.0.0-beta.2

2 years ago

2.0.0-beta.1

2 years ago

2.0.0-alpha.37

2 years ago

2.0.0-alpha.36

2 years ago

2.0.0-alpha.35

2 years ago

2.0.0-alpha.34

2 years ago

2.0.0-alpha.33

2 years ago

2.0.0-alpha.32

2 years ago

2.0.0-alpha.31

3 years ago

2.0.0-alpha.30

3 years ago

2.0.0-alpha.29

3 years ago

2.0.0-alpha.28

3 years ago

2.0.0-alpha.27

3 years ago

2.0.0-alpha.26

3 years ago

1.30.1

3 years ago

1.30.0

3 years ago

2.0.0-alpha.25

3 years ago

2.0.0-alpha.24

3 years ago

2.0.0-alpha.23

3 years ago

2.0.0-alpha.22

3 years ago

2.0.0-alpha.21

3 years ago

2.0.0-alpha.20

3 years ago

2.0.0-alpha.18

3 years ago

2.0.0-alpha.16

3 years ago

2.0.0-alpha.14

3 years ago

2.0.0-alpha.13

3 years ago

2.0.0-alpha.11

3 years ago

2.0.0-alpha.10

3 years ago

2.0.0-alpha.9

4 years ago

2.0.0-alpha.8

4 years ago

1.29.0

4 years ago

2.0.0-alpha.7

4 years ago

2.0.0-alpha.6

4 years ago

2.0.0-alpha.5

4 years ago

2.0.0-alpha.4

4 years ago

2.0.0-alpha.3

4 years ago

2.0.0-alpha.2

4 years ago

2.0.0-alpha.1

4 years ago

1.28.5

5 years ago

1.28.4

5 years ago

1.28.3

5 years ago

1.28.2

5 years ago

1.28.1

5 years ago

1.28.0

5 years ago

1.27.2

5 years ago

1.27.1

5 years ago

1.27.0

5 years ago

1.26.0

5 years ago

1.25.0

5 years ago

1.24.0

5 years ago

1.23.0

5 years ago

1.22.0

5 years ago

1.21.1

5 years ago

1.21.0

5 years ago

1.20.1

5 years ago

1.20.0

5 years ago

1.19.0

5 years ago

1.18.0

5 years ago

1.17.0

5 years ago

1.16.0

5 years ago

1.15.1

5 years ago

1.15.0

5 years ago

1.14.1

5 years ago

1.14.0

5 years ago

1.13.0

5 years ago

1.12.1

5 years ago

1.12.0

5 years ago

1.11.2

5 years ago

1.11.1

5 years ago

1.11.0

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.1

5 years ago

1.8.0

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

1.0.0-rc22

6 years ago

1.0.0-rc21

6 years ago

1.0.0-rc19

6 years ago

1.0.0-rc18

6 years ago

1.0.0-rc17

6 years ago

1.0.0-rc16

6 years ago

1.0.0-rc15

6 years ago

1.0.0-rc14

6 years ago

1.0.0-rc13

6 years ago

1.0.0-rc12

6 years ago

1.0.0-rc11

6 years ago

1.0.0-rc10

6 years ago

1.0.0-rc9

6 years ago

1.0.0-rc8

6 years ago

1.0.0-rc6

6 years ago

1.0.0-rc5

6 years ago

1.0.0-rc4

6 years ago

1.0.0-rc3

6 years ago

1.0.0-rc2

6 years ago

1.0.0-rc1

6 years ago

1.0.0-alpha4

6 years ago

1.0.0-alpha3

6 years ago

1.0.0-alpha2

6 years ago

1.0.0-alpha1

6 years ago

0.17.0

6 years ago

0.16.0

6 years ago

0.15.0

6 years ago

0.14.11

6 years ago

0.14.9

7 years ago

0.14.8

7 years ago

0.14.5

7 years ago

0.13.0

7 years ago

0.12.1

7 years ago

0.12.0

7 years ago

0.11.0

7 years ago

0.10.0

7 years ago

0.9.0

7 years ago

0.8.0

7 years ago

0.7.0

7 years ago

0.6.0

7 years ago

0.5.0

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago