Day.js Demo Online

Day.js is a date library alternative to Moment.js with the same modern API.
Day.js, 2.6KB(gzip)
Moment.js, 60KB(gzip, with locals) (17KB gzip without locals)

Current time of the device

dayjs().format('YYYY-MM-DD HH:mm:ss'): 

Day.js(Day js) demo online

Day js = day.js, it is a javascript date library.
It's easy to use. If you use Moment.js, you already know how to use Day.js.

Try Day.js:

Result:

  • Code:
    dayjs('2019-1-1').format('dddd') // get what day is it today
    Result:
    Tuesday
  • Code:
    dayjs('2018-10-1').add(1, 'days').format('YYYY-MM-DD')
    Result:
    2018-10-2
  • Code:
    dayjs('2018-10-1').isBefore('2018-1-1')
    Result:
    false

Day.js Features

  • lightweight(2.6kb)
  • the same API as Moment.js
  • i18n support(multiple languages)
Day.js is a very good javascript library for formatting dates, formatting time, date operations (addition and subtraction), and more.