1.11.13 • Published 2 months ago

dayjs v1.11.13

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 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

Usage Trend

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@web-client/plugin-component-vue@wynskm/demo-rui@whilethiscompiles/calendar@yeahmat/utils@wooldox/reservoir-kit-uiyuan-qingdao-zld-browserz-element-pluszall-avuevsinoeee-plus@acceleratxr/core_sdk-studio@acceleratxr/licensing@_projector/handlers@alltype/v3zjr@alltype/vue3@amamiryoin/formui@bookinglab/bl-api-wrapper-jrni@banditbadgod/react@leonardodipace/x@monodrom/monodrom@shohrux_saidov/dayjs@spaceone/design-system@stattrack/widget_remove-me@travio/nodes-graph@jiangchengw/avue@js_lee/peiqi-materials@klicker-uzh/graphql@koa_web/koa-entry@koa_web/koa-nginx@remote.it/serverless@sdkset/dayjs@runwork/runui@eneropl/js-timer@energyweb/origin-ui-core@evaluation-common/use@fasum/stockjs@fagnersalesdev/my-date@waoadb/react-sdk@vocen/shared@ninembs/lib@ocloud/uiamamiryoin-formuiaikunarco-vue-pro-componentsbeer-ant-design-vuebilflo.commonlogicbilflo.nodemodules1bootstrap-vue-plusbys-container@btffamily/checkaam@btffamily/conpmon@btffamily/fuel@btffamily/realhomes@btffamily/tmaapp@btffamily/tmat@btffamily/union@btffamily/xpcommon@glennliao/uni-xczt-app-componentscustomer-query-front-enddesign-rth-mobiledistancedatedigital-accountability-mapapi-utility@titaui/pc@atlas-engine/fullstack_server@atlas-engine/atlas_engine_sdk@avocad0/sdk@leaddreamer/esbrowser@leaddreamer/esbusiness@umijs-ng/openapi@mredwardlik/test-library@premmia/datespnp-modern-search-coreeasy-select-rn@commt/commt-rn-sdk@niftywell/vue-erdjsyunjing-shop-manageimily-gallery@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-user
1.11.13

2 months ago

1.11.12

4 months ago

1.11.11

6 months ago

1.11.10

1 year ago

1.11.9

1 year ago

1.11.8

1 year ago

1.11.7

2 years ago

1.11.6

2 years ago

2.0.0-alpha.3

2 years ago

2.0.0-alpha.4

2 years ago

1.11.4

2 years ago

1.11.5

2 years ago

1.11.3

2 years ago

1.11.2

2 years ago

2.0.0-alpha.1

3 years ago

2.0.0-alpha.2

3 years ago

1.11.1

3 years ago

1.11.0

3 years ago

1.10.8

3 years ago

1.10.7

3 years ago

1.10.6

3 years ago

1.10.5

3 years ago

1.10.4

4 years ago

1.10.3

4 years ago

1.10.2

4 years ago

1.10.1

4 years ago

1.10.0

4 years ago

1.9.8

4 years ago

1.9.7

4 years ago

1.9.6

4 years ago

1.9.5

4 years ago

1.9.4

4 years ago

1.9.3

4 years ago

1.9.2

4 years ago

1.9.1

4 years ago

1.9.0

4 years ago

1.8.36

4 years ago

1.8.35

4 years ago

1.8.34

4 years ago

1.8.33

4 years ago

1.8.32

4 years ago

1.8.31

4 years ago

1.8.30

4 years ago

1.8.29

4 years ago

1.8.28

4 years ago

1.8.27

4 years ago

1.8.26

5 years ago

1.8.25

5 years ago

1.8.24

5 years ago

1.8.23

5 years ago

1.8.22

5 years ago

1.8.21

5 years ago

1.8.20

5 years ago

1.8.19

5 years ago

1.8.18

5 years ago

1.8.17

5 years ago

1.8.16

5 years ago

1.8.15

5 years ago

1.8.14

5 years ago

1.8.13

6 years ago

1.8.12

6 years ago

1.8.11

6 years ago

1.8.10

6 years ago

1.8.9

6 years ago

1.8.8

6 years ago

1.8.7

6 years ago

1.8.6

6 years ago

1.8.5

6 years ago

1.8.4

6 years ago

1.8.3

6 years ago

1.8.2

6 years ago

1.8.1

6 years ago

1.8.0

6 years ago

1.7.8

6 years ago

1.7.7

6 years ago

1.7.6

6 years ago

1.7.5

6 years ago

1.7.4

6 years ago

1.7.3

6 years ago

1.7.2

6 years ago

1.7.1

6 years ago

1.7.0

6 years ago

1.6.10

6 years ago

1.6.9

6 years ago

1.6.8

6 years ago

1.6.7

6 years ago

1.6.6

6 years ago

1.6.5

6 years ago

1.6.4

6 years ago

1.6.3

6 years ago

1.6.2

6 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.24

6 years ago

1.5.23

6 years ago

1.5.22

6 years ago

1.5.21

6 years ago

1.5.20

6 years ago

1.5.19

7 years ago

1.5.18

7 years ago

1.5.17

7 years ago

1.5.16

7 years ago

1.5.15

7 years ago

1.5.14

7 years ago

1.5.13

7 years ago

1.5.12

7 years ago

1.5.11

7 years ago

1.5.10

7 years ago

1.5.9

7 years ago

1.5.8

7 years ago

1.5.6

7 years ago

1.5.5

7 years ago

1.5.4

7 years ago

1.5.3

7 years ago

1.5.2

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.3

7 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago