1.11.3 • Published 2 months ago

dayjs v1.11.3

Weekly downloads
4,341,005
License
MIT
Repository
github
Last release
2 months ago

English | 简体中文 | 日本語 | Português Brasileiro | 한국어 | Español (España) | Русский | Türkçe

Day.js is a minimalist JavaScript library that parses, validates, manipulates, and displays dates and times for modern browsers with a largely Moment.js-compatible API. If you use Moment.js, you already know how to use Day.js.

dayjs().startOf('month').add(1, 'day').set('year', 2018).format('YYYY-MM-DD HH:mm:ss');
  • 🕒 Familiar Moment.js API & patterns
  • 💪 Immutable
  • 🔥 Chainable
  • 🌐 I18n support
  • 📦 2kb mini library
  • 👫 All browsers supported

Getting Started

Documentation

You can find for more details, API, and other docs on day.js.org website.

Installation

npm install dayjs --save

📚Installation Guide

API

It's easy to use Day.js APIs to parse, validate, manipulate, and display dates and times.

dayjs('2018-08-08') // parse

dayjs().format('{YYYY} MM-DDTHH:mm:ss SSS [Z] A') // display

dayjs().set('month', 3).month() // get & set

dayjs().add(1, 'year') // manipulate

dayjs().isBefore(dayjs()) // query

📚API Reference

I18n

Day.js has great support for internationalization.

But none of them will be included in your build unless you use it.

import 'dayjs/locale/es' // load on demand

dayjs.locale('es') // use Spanish locale globally

dayjs('2018-05-05').locale('zh-cn').format() // use Chinese Simplified locale in a specific instance

📚Internationalization

Plugin

A plugin is an independent module that can be added to Day.js to extend functionality or add new features.

import advancedFormat from 'dayjs/plugin/advancedFormat' // load on demand

dayjs.extend(advancedFormat) // use plugin

dayjs().format('Q Do k kk X x') // more available formats

📚Plugin List

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

[Become a sponsor via Github] [Become a sponsor via OpenCollective]

Contributors

This project exists thanks to all the people who contribute.

Please give us a 💖 star 💖 to support us. Thank you.

And thank you to all our backers! 🙏

License

Day.js is licensed under a MIT License.

cypress@bondsports/checkout_flowsumfunctionhzxkkk@saasxx/antd@sooha/uikitalgotia-test-packageagape-form-builderartesanauctic-uidiscord-forwarderequifax-insight-generatormedcarexlqvirtuellesburgerburo@wujin/legend-avuewebprojectmobiqasir-ui-alpha@midigator/styleguidewinseavuereact-native-bluetooth2killi8n-react-native-fast-imagewebapp-userbingo-platformbingo-platform1lqlq-componentsv-single-pickertestygpso-packegeelp-elementwinsewinseavuejbb-lib@testdev0922/restaurantweebts-workflownm-lib-skinstd-lib-skinspreact-cafuneonedash-toolsvue-scameltaro-ui-xubsca-adapter-shared@podiumhq/podium-uicoco-flight-domesticstorecast-web-commonsykmeldinger-testvue-cli-plugin-vue-dashapp-campusmindscop_vuemindscop_zvueryoma_rss@youngjs/youngjsydatejs@testdev0922/subscribegray-react-toolswakeupjs@aburkov/exo@puzl/puzl-cloud_authorization-modulebritive-cli-test1lotus-subscribelive.interact.h5live.interact.h5.fuckcchartshxy-vantzsyyvue-dashboard-generatorrealtime-marketview-page-tableylf-vue-pandoravue-dzkf-uivue-h3c-uivue-openplat-master@springleo/rds-vueng-rokt@helpscout/editor@kidsagree/uiconectatedongsan-adminwmzy-mobilemy-antddd2-admin-renren-security-enterpriseui-formsinvoicewave_backvda_vueil-front-components@dovyih/nice-drink-clicom.sixt.web.lynx-sixt-plusavailability-graphql-apireact-rateli18n-cli-testlhl88899sales-insights-ui@farmisen/redux-phoenixyindun-test-xyjtest-xyj-xunqc-loggeryoupinyao-weapp-webpack@setu/upi-deep-linkmultisig-serverjdd-koa-core@antony.k1208/gothaer-pattern-libraryctk-react
1.11.3

2 months ago

1.11.2

3 months ago

2.0.0-alpha.1

3 months ago

2.0.0-alpha.2

3 months ago

1.11.1

4 months ago

1.11.0

5 months ago

1.10.8

5 months ago

1.10.7

11 months ago

1.10.6

1 year ago

1.10.5

1 year ago

1.10.4

2 years ago

1.10.3

2 years ago

1.10.2

2 years ago

1.10.1

2 years ago

1.10.0

2 years ago

1.9.8

2 years ago

1.9.7

2 years ago

1.9.6

2 years ago

1.9.5

2 years ago

1.9.4

2 years ago

1.9.3

2 years ago

1.9.2

2 years ago

1.9.1

2 years ago

1.9.0

2 years ago

1.8.36

2 years ago

1.8.35

2 years ago

1.8.34

2 years ago

1.8.33

2 years ago

1.8.32

2 years ago

1.8.31

2 years ago

1.8.30

2 years ago

1.8.29

2 years ago

1.8.28

2 years ago

1.8.27

2 years ago

1.8.26

2 years ago

1.8.25

2 years ago

1.8.24

2 years ago

1.8.23

2 years ago

1.8.22

2 years ago

1.8.21

2 years ago

1.8.20

3 years ago

1.8.19

3 years ago

1.8.18

3 years ago

1.8.17

3 years ago

1.8.16

3 years ago

1.8.15

3 years ago

1.8.14

3 years ago

1.8.13

3 years ago

1.8.12

3 years ago

1.8.11

3 years ago

1.8.10

3 years ago

1.8.9

3 years ago

1.8.8

3 years ago

1.8.7

3 years ago

1.8.6

3 years ago

1.8.5

4 years ago

1.8.4

4 years ago

1.8.3

4 years ago

1.8.2

4 years ago

1.8.1

4 years ago

1.8.0

4 years ago

1.7.8

4 years ago

1.7.7

4 years ago

1.7.6

4 years ago

1.7.5

4 years ago

1.7.4

4 years ago

1.7.3

4 years ago

1.7.2

4 years ago

1.7.1

4 years ago

1.7.0

4 years ago

1.6.10

4 years ago

1.6.9

4 years ago

1.6.8

4 years ago

1.6.7

4 years ago

1.6.6

4 years ago

1.6.5

4 years ago

1.6.4

4 years ago

1.6.3

4 years ago

1.6.2

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.24

4 years ago

1.5.23

4 years ago

1.5.22

4 years ago

1.5.21

4 years ago

1.5.20

4 years ago

1.5.19

4 years ago

1.5.18

4 years ago

1.5.17

4 years ago

1.5.16

4 years ago

1.5.15

4 years ago

1.5.14

4 years ago

1.5.13

4 years ago

1.5.12

4 years ago

1.5.11

4 years ago

1.5.10

4 years ago

1.5.9

4 years ago

1.5.8

4 years ago

1.5.6

4 years ago

1.5.5

4 years ago

1.5.4

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago