Dayjs

dayjs

⏰ Fast 2KB immutable date library.

dayjs is a minimalist JavaScript library for modern browsers with a largely Moment.js-compatible API, with:

🕒 Familiar Moment.js API & patterns 💪 Immutable 🔥 Chainable 📦 2kb mini library 👫 All browsers support

Get it: npm install dayjs

Sample usage:

1
2
3
4
5
6
7
const dayjs = require('dayjs');

dayjs()
.startOf('month')
.add(1, 'day')
.set('year', 2018)
.format('YYYY-MM-DD HH:mm:ss');

GIF FTW!

dayjs

Suggest a module

Comments