Gathering detailed insights and metrics for dayjs
Gathering detailed insights and metrics for dayjs
Gathering detailed insights and metrics for dayjs
Gathering detailed insights and metrics for dayjs
dayjs-nuxt
Day.JS Module for Nuxt
jalali-plugin-dayjs
Persian (Jalali, Khorshidi) Plugin for Day.js
dayjs-with-plugins
Day.js with all plugins and locales added out of the box, no need to use dayjs.extend nor dayjs.locale!
@nuxtjs/dayjs
The best way for use Day.js easily in your Nuxt.js project.
⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
npm install dayjs
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
47,058 Stars
1,547 Commits
2,305 Forks
279 Watching
9 Branches
334 Contributors
Updated on 28 Nov 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-6.3%
3,964,623
Compared to previous day
Last week
1.4%
22,421,613
Compared to previous week
Last month
5%
94,813,911
Compared to previous month
Last year
22.4%
1,011,302,210
Compared to previous year
29
English | 简体中文 | 日本語 | Português Brasileiro | 한국어 | Español (España) | Русский | Türkçe | සිංහල | עברית
Fast 2kB alternative to Moment.js with the same modern API
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.
1dayjs().startOf('month').add(1, 'day').set('year', 2018).format('YYYY-MM-DD HH:mm:ss');
You can find more details, API, and other docs on day.js.org website.
1npm install dayjs --save
It's easy to use Day.js APIs to parse, validate, manipulate, and display dates and times.
1dayjs('2018-08-08') // parse 2 3dayjs().format('{YYYY} MM-DDTHH:mm:ss SSS [Z] A') // display 4 5dayjs().set('month', 3).month() // get & set 6 7dayjs().add(1, 'year') // manipulate 8 9dayjs().isBefore(dayjs()) // query
Day.js has great support for internationalization.
But none of them will be included in your build unless you use it.
1import 'dayjs/locale/es' // load on demand 2 3dayjs.locale('es') // use Spanish locale globally 4 5dayjs('2018-05-05').locale('zh-cn').format() // use Chinese Simplified locale in a specific instance
A plugin is an independent module that can be added to Day.js to extend functionality or add new features.
1import advancedFormat from 'dayjs/plugin/advancedFormat' // load on demand 2 3dayjs.extend(advancedFormat) // use plugin 4 5dayjs().format('Q Do k kk X x') // more available formats
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]
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! 🙏
Day.js is licensed under a MIT License.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
9 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 7
Reason
Found 4/21 approved changesets -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
92 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More