Lightweight Date & Time Nanipulation Library – dayjs

Category: Date & Time , Javascript , Recommended | June 14, 2018
Author: xx45
Views Total: 993
Official Page: Go to website
Last Update: June 14, 2018
License: MIT

Preview:

Lightweight Date & Time Nanipulation Library – dayjs

Description:

dayjs is a blazing-fast,  ultra light (2kb) alternative to the moment.js library that helps you parse, validate, manipulate, and display dates and times in pure JavaScript.

Installation:

# NPM
$ npm install dayjs --save

Import the dayjs library into your project.

var dayjs = require('dayjs');
<!-- OR -->
<script src="//unpkg.com/dayjs"></script>

Usage:

All the API are similar to the Moment.js, just replace the ‘moment’ with ‘dayjs’ as follows:

// get the current date and time
dayjs();

...

Changelog:

06/14/2018

  • v1.6.9: bugfix

06/11/2018

  • v1.6.7: bugfix

Leave a Reply