版博士V2.0程序
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

README.md 6.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. English | [简体中文](./docs/zh-cn/README.zh-CN.md) | [日本語](./docs/ja/README-ja.md) | [Português Brasileiro](./docs/pt-br/README-pt-br.md) | [한국어](./docs/ko/README-ko.md) | [Español (España)](./docs/es-es/README-es-es.md) | [Русский](./docs/ru/README-ru.md) | [Türkçe](./docs/tr/README-tr.md) | [සිංහල](./docs/si/README-si.md)
  2. <p align="center"><a href="https://day.js.org/" target="_blank" rel="noopener noreferrer"><img width="550"
  3. src="https://user-images.githubusercontent.com/17680888/39081119-3057bbe2-456e-11e8-862c-646133ad4b43.png"
  4. alt="Day.js"></a></p>
  5. <p align="center">Fast <b>2kB</b> alternative to Moment.js with the same modern API</p>
  6. <p align="center">
  7. <a href="https://unpkg.com/dayjs/dayjs.min.js"><img
  8. src="https://img.badgesize.io/https://unpkg.com/dayjs/dayjs.min.js?compression=gzip&style=flat-square"
  9. alt="Gzip Size"></a>
  10. <a href="https://www.npmjs.com/package/dayjs"><img src="https://img.shields.io/npm/v/dayjs.svg?style=flat-square&colorB=51C838"
  11. alt="NPM Version"></a>
  12. <a href="https://travis-ci.com/iamkun/dayjs"><img
  13. src="https://img.shields.io/travis/iamkun/dayjs/master.svg?style=flat-square" alt="Build Status"></a>
  14. <a href="https://codecov.io/gh/iamkun/dayjs"><img
  15. src="https://img.shields.io/codecov/c/github/iamkun/dayjs/master.svg?style=flat-square" alt="Codecov"></a>
  16. <a href="https://github.com/iamkun/dayjs/blob/master/LICENSE"><img
  17. src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square" alt="License"></a>
  18. <br>
  19. <a href="https://saucelabs.com/u/dayjs">
  20. <img width="750" src="https://user-images.githubusercontent.com/17680888/40040137-8e3323a6-584b-11e8-9dba-bbe577ee8a7b.png" alt="Sauce Test Status">
  21. </a>
  22. </p>
  23. > 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.
  24. ```js
  25. dayjs().startOf('month').add(1, 'day').set('year', 2018).format('YYYY-MM-DD HH:mm:ss');
  26. ```
  27. * 🕒 Familiar Moment.js API & patterns
  28. * 💪 Immutable
  29. * 🔥 Chainable
  30. * 🌐 I18n support
  31. * 📦 2kb mini library
  32. * 👫 All browsers supported
  33. ---
  34. ## Getting Started
  35. ### Documentation
  36. You can find for more details, API, and other docs on [day.js.org](https://day.js.org/) website.
  37. ### Installation
  38. ```console
  39. npm install dayjs --save
  40. ```
  41. 📚[Installation Guide](https://day.js.org/docs/en/installation/installation)
  42. ### API
  43. It's easy to use Day.js APIs to parse, validate, manipulate, and display dates and times.
  44. ```javascript
  45. dayjs('2018-08-08') // parse
  46. dayjs().format('{YYYY} MM-DDTHH:mm:ss SSS [Z] A') // display
  47. dayjs().set('month', 3).month() // get & set
  48. dayjs().add(1, 'year') // manipulate
  49. dayjs().isBefore(dayjs()) // query
  50. ```
  51. 📚[API Reference](https://day.js.org/docs/en/parse/parse)
  52. ### I18n
  53. Day.js has great support for internationalization.
  54. But none of them will be included in your build unless you use it.
  55. ```javascript
  56. import 'dayjs/locale/es' // load on demand
  57. dayjs.locale('es') // use Spanish locale globally
  58. dayjs('2018-05-05').locale('zh-cn').format() // use Chinese Simplified locale in a specific instance
  59. ```
  60. 📚[Internationalization](https://day.js.org/docs/en/i18n/i18n)
  61. ### Plugin
  62. A plugin is an independent module that can be added to Day.js to extend functionality or add new features.
  63. ```javascript
  64. import advancedFormat from 'dayjs/plugin/advancedFormat' // load on demand
  65. dayjs.extend(advancedFormat) // use plugin
  66. dayjs().format('Q Do k kk X x') // more available formats
  67. ```
  68. 📚[Plugin List](https://day.js.org/docs/en/plugin/plugin)
  69. ## Sponsors
  70. Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
  71. [[Become a sponsor via Github](https://github.com/sponsors/iamkun/)] [[Become a sponsor via OpenCollective](https://opencollective.com/dayjs#sponsor)]
  72. <a href="https://toyokumo.co.jp" target="_blank">
  73. <img width="70" src="https://user-images.githubusercontent.com/17680888/197092231-2367b5eb-1e43-467e-a311-23f7cd97b086.png">
  74. </a>
  75. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  76. <a href="https://github.com/alan-eu" target="_blank">
  77. <img width="70" src="https://avatars.githubusercontent.com/u/18175329?s=52&v=4">
  78. </a>
  79. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  80. <a href="https://rxdb.info/?utm_source=day.js.org&utm_medium=banner&utm_campaign=day.js.org-sponsored" target="_blank"><img width="70" src="https://user-images.githubusercontent.com/17680888/200301812-9c9bd523-5dc4-4cab-b380-543fbcd3802c.svg"></a>
  81. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  82. <a href="https://github.com/vendure-ecommerce" target="_blank"><img width="70" src="https://avatars.githubusercontent.com/u/39629390?s=52&v=4"></a>
  83. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  84. <a href="https://opencollective.com/docbot" target="_blank"><img width="70" src="https://images.opencollective.com/docbot/457761e/logo.png"></a>
  85. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  86. <a href="https://opencollective.com/datawrapper" target="_blank"><img width="70" src="https://images.opencollective.com/datawrapper/c13e229/logo.png"></a>
  87. ## Contributors
  88. This project exists thanks to all the people who contribute.
  89. Please give us a 💖 star 💖 to support us. Thank you.
  90. And thank you to all our backers! 🙏
  91. <a href="https://opencollective.com/dayjs/backer/0/website?requireActive=false" target="_blank"><img width="35" src="https://opencollective.com/dayjs/backer/0/avatar.svg?requireActive=false"></a>
  92. <a href="https://opencollective.com/dayjs/backer/1/website?requireActive=false" target="_blank"><img width="35" src="https://opencollective.com/dayjs/backer/1/avatar.svg?requireActive=false"></a>
  93. <a href="https://opencollective.com/dayjs/backer/2/website?requireActive=false" target="_blank"><img width="35" src="https://opencollective.com/dayjs/backer/2/avatar.svg?requireActive=false"></a>
  94. <a href="https://opencollective.com/dayjs/backer/3/website?requireActive=false" target="_blank"><img width="35" src="https://opencollective.com/dayjs/backer/3/avatar.svg?requireActive=false"></a>
  95. <br />
  96. <a href="https://opencollective.com/dayjs#backers" target="_blank"><img src="https://opencollective.com/dayjs/contributors.svg?width=890" /></a>
  97. ## License
  98. Day.js is licensed under a [MIT License](./LICENSE).