{"id":13394303,"url":"https://github.com/iamkun/dayjs","last_synced_at":"2025-05-12T14:46:21.172Z","repository":{"id":37269762,"uuid":"128907699","full_name":"iamkun/dayjs","owner":"iamkun","description":"⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API","archived":false,"fork":false,"pushed_at":"2025-04-20T09:27:37.000Z","size":5566,"stargazers_count":47742,"open_issues_count":1108,"forks_count":2354,"subscribers_count":277,"default_branch":"dev","last_synced_at":"2025-05-05T13:50:17.255Z","etag":null,"topics":["date","date-formatting","datetime","dayjs","moment","time"],"latest_commit_sha":null,"homepage":"https://day.js.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamkun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["iamkun"],"patreon":null,"open_collective":"dayjs","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-04-10T09:26:44.000Z","updated_at":"2025-05-05T10:52:47.000Z","dependencies_parsed_at":"2023-10-04T23:10:38.705Z","dependency_job_id":"eb8cdd28-fbc5-480b-ae3f-5fa565b3d0c9","html_url":"https://github.com/iamkun/dayjs","commit_stats":{"total_commits":1174,"total_committers":343,"mean_commits":3.422740524781341,"dds":0.5136286201022147,"last_synced_commit":"975e2fa46ebb48224a2db782f3188af99fc1dbc8"},"previous_names":["xx45/dayjs"],"tags_count":121,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamkun%2Fdayjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamkun%2Fdayjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamkun%2Fdayjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamkun%2Fdayjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamkun","download_url":"https://codeload.github.com/iamkun/dayjs/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252623049,"owners_count":21778159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["date","date-formatting","datetime","dayjs","moment","time"],"created_at":"2024-07-30T17:01:15.412Z","updated_at":"2025-05-12T14:46:21.124Z","avatar_url":"https://github.com/iamkun.png","language":"JavaScript","readme":"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) | [עברית](./docs/he/README-he.md)\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://day.js.org/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg width=\"550\"\n                                                                             src=\"https://user-images.githubusercontent.com/17680888/39081119-3057bbe2-456e-11e8-862c-646133ad4b43.png\"\n                                                                             alt=\"Day.js\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003eFast \u003cb\u003e2kB\u003c/b\u003e alternative to Moment.js with the same modern API\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://bundlephobia.com/package/dayjs\"\u003e\u003cimg\n            src=\"https://img.shields.io/bundlephobia/minzip/dayjs?style=flat-square\u0026color=%2345cc11\"\n            alt=\"Gzip Size\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/dayjs\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/dayjs.svg?style=flat-square\u0026colorB=51C838\"\n                                                       alt=\"NPM Version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/iamkun/dayjs/actions/workflows/check.yml\"\u003e\u003cimg\n            src=\"https://img.shields.io/github/actions/workflow/status/iamkun/dayjs/check.yml?style=flat-square\" alt=\"Build Status\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/iamkun/dayjs\"\u003e\u003cimg\n            src=\"https://img.shields.io/codecov/c/github/iamkun/dayjs/master.svg?style=flat-square\" alt=\"Codecov\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/iamkun/dayjs/blob/master/LICENSE\"\u003e\u003cimg\n            src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\" alt=\"License\"\u003e\u003c/a\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://saucelabs.com/u/dayjs\"\u003e\n        \u003cimg width=\"750\" src=\"https://user-images.githubusercontent.com/17680888/40040137-8e3323a6-584b-11e8-9dba-bbe577ee8a7b.png\" alt=\"Sauce Test Status\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e 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.\n\n```js\ndayjs().startOf('month').add(1, 'day').set('year', 2018).format('YYYY-MM-DD HH:mm:ss');\n```\n\n* 🕒 Familiar Moment.js API \u0026 patterns\n* 💪 Immutable\n* 🔥 Chainable\n* 🌐 I18n support\n* 📦 2kb mini library\n* 👫 All browsers supported\n\n---\n\n## Getting Started\n\n### Documentation\n\nYou can find more details, API, and other docs on [day.js.org](https://day.js.org/) website.\n\n### Installation\n\n```console\nnpm install dayjs --save\n```\n\n📚[Installation Guide](https://day.js.org/docs/en/installation/installation)\n\n### API\n\nIt's easy to use Day.js APIs to parse, validate, manipulate, and display dates and times.\n\n```javascript\ndayjs('2018-08-08') // parse\n\ndayjs().format('{YYYY} MM-DDTHH:mm:ss SSS [Z] A') // display\n\ndayjs().set('month', 3).month() // get \u0026 set\n\ndayjs().add(1, 'year') // manipulate\n\ndayjs().isBefore(dayjs()) // query\n```\n\n📚[API Reference](https://day.js.org/docs/en/parse/parse)\n\n### I18n\n\nDay.js has great support for internationalization.\n\nBut none of them will be included in your build unless you use it.\n\n```javascript\nimport 'dayjs/locale/es' // load on demand\n\ndayjs.locale('es') // use Spanish locale globally\n\ndayjs('2018-05-05').locale('zh-cn').format() // use Chinese Simplified locale in a specific instance\n```\n\n📚[Internationalization](https://day.js.org/docs/en/i18n/i18n)\n\n### Plugin\n\nA plugin is an independent module that can be added to Day.js to extend functionality or add new features.\n\n```javascript\nimport advancedFormat from 'dayjs/plugin/advancedFormat' // load on demand\n\ndayjs.extend(advancedFormat) // use plugin\n\ndayjs().format('Q Do k kk X x') // more available formats\n```\n\n📚[Plugin List](https://day.js.org/docs/en/plugin/plugin)\n\n### Usage Trend\n\n\u003ca href=\"https://npm-compare.com/moment,dayjs/#timeRange=THREE_YEARS\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/3455798/270162667-c7bd2ebe-675e-45c6-a2c9-dc67f3b65d6e.png\"\u003e\n\u003c/a\u003e\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website.\n\n[[Become a sponsor via Github](https://github.com/sponsors/iamkun/)] [[Become a sponsor via OpenCollective](https://opencollective.com/dayjs#sponsor)]\n\n\u003ca href=\"https://toyokumo.co.jp\" target=\"_blank\"\u003e\n  \u003cimg width=\"70\" src=\"https://user-images.githubusercontent.com/17680888/197092231-2367b5eb-1e43-467e-a311-23f7cd97b086.png\"\u003e\n\u003c/a\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://github.com/ken-swyfft\" target=\"_blank\"\u003e\n  \u003cimg width=\"70\" src=\"https://avatars.githubusercontent.com/u/65305317?v=4\"\u003e\n\u003c/a\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://opencollective.com/sight-sound\" target=\"_blank\"\u003e\n  \u003cimg width=\"70\" src=\"https://images.opencollective.com/sight-sound/54f7220/logo/256.png?height=256\"\u003e\n\u003c/a\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://www.exoflare.com/open-source/?utm_source=dayjs\u0026utm_campaign=open_source\" target=\"_blank\"\u003e\n  \u003cimg width=\"70\" src=\"https://user-images.githubusercontent.com/17680888/162761622-1407a849-0c41-4591-8aa9-f98114ec2092.png\"\u003e\n\u003c/a\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://chudovo.com/front-end-development/\" target=\"_blank\"\u003e\n  \u003cimg width=\"70\" src=\"https://images.opencollective.com/chudovo/3c866f5/logo/256.png?height=256\"\u003e\n\u003c/a\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://github.com/radioplusexperts\" target=\"_blank\"\u003e\n  \u003cimg width=\"70\" src=\"https://avatars.githubusercontent.com/u/188567998?v=4\"\u003e\n\u003c/a\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://github.com/storyblok\" target=\"_blank\"\u003e\n  \u003cimg width=\"70\" src=\"https://avatars.githubusercontent.com/u/13880908?s=200\u0026v=4\"\u003e\n\u003c/a\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://bestkru.com/\" target=\"_blank\"\u003e\n  \u003cimg width=\"70\" src=\"https://avatars.githubusercontent.com/u/159320286\" alt=\"BestKru\"\u003e\n\u003c/a\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://handsontable.com/docs/react-data-grid/?utm_source=Dayjs_GH\u0026utm_medium=sponsorship\u0026utm_campaign=library_sponsorship\" target=\"_blank\"\u003e\n  \u003cimg width=\"70\" src=\"https://github.com/user-attachments/assets/426c3476-dc34-44d1-a904-ed58dbd20dd6\"\u003e\n\u003c/a\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://route4me.com/\" target=\"_blank\"\u003e\n  \u003cimg width=\"70\" src=\"https://github.com/user-attachments/assets/3fbc86c5-98a9-49c2-beae-1969026fcd76\" alt=\"Route Optimizer and Route Planner Software\"\u003e\n\u003c/a\u003e\n\n\n## Contributors\n\nThis project exists thanks to all the people who contribute.\n\nPlease give us a 💖 star 💖 to support us. Thank you.\n\nAnd thank you to all our backers! 🙏\n\n\u003ca href=\"https://opencollective.com/dayjs/backer/0/website?requireActive=false\" target=\"_blank\"\u003e\u003cimg width=\"35\" src=\"https://opencollective.com/dayjs/backer/0/avatar.svg?requireActive=false\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/dayjs/backer/1/website?requireActive=false\" target=\"_blank\"\u003e\u003cimg width=\"35\" src=\"https://opencollective.com/dayjs/backer/1/avatar.svg?requireActive=false\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/dayjs/backer/2/website?requireActive=false\" target=\"_blank\"\u003e\u003cimg width=\"35\" src=\"https://opencollective.com/dayjs/backer/2/avatar.svg?requireActive=false\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/dayjs/backer/3/website?requireActive=false\" target=\"_blank\"\u003e\u003cimg width=\"35\" src=\"https://opencollective.com/dayjs/backer/3/avatar.svg?requireActive=false\"\u003e\u003c/a\u003e\n\u003cbr /\u003e\n\u003ca href=\"https://opencollective.com/dayjs#backers\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/dayjs/contributors.svg?width=890\" /\u003e\u003c/a\u003e\n\n## License\n\nDay.js is licensed under a [MIT License](./LICENSE).\n","funding_links":["https://github.com/sponsors/iamkun","https://opencollective.com/dayjs","https://github.com/sponsors/iamkun/","https://opencollective.com/sight-sound","https://opencollective.com/dayjs/backer/0/website?requireActive=false","https://opencollective.com/dayjs/backer/1/website?requireActive=false","https://opencollective.com/dayjs/backer/2/website?requireActive=false","https://opencollective.com/dayjs/backer/3/website?requireActive=false"],"categories":["JavaScript","Packages","HarmonyOS","Libraries","第三方库介绍","包","[Node.js](https://github.com/nodejs/node)","Repository","JS","常用工具","*.js","前端开发框架及项目","Date","目录","others","Common libraries","GIT 仓库","Date [🔝](#readme)","Projects List",":clap: 欢迎参与​","Uncategorized","UI Components","Advantage","Dates and Time","日期","前端常用","Javascript"],"sub_categories":["Date","Windows Manager","JavaScript","工具库","日期","Datetime","Date \u0026 Time","Browser","其他_文本生成、文本对话","Runner","日期处理","日期/时间","Uncategorized","Date Pickers","Reactive Programming","运行器","npm packages","运行器e2e测试"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamkun%2Fdayjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamkun%2Fdayjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamkun%2Fdayjs/lists"}