Date-lib
Help javascript users to get the formatted date string from the date
Installing
npm install --save date-format-lib
Usage
When you use ES5
var DateLib = ;
When you use ES6
;
Get today's date string with a giving pattern Assume today is March 16 1982
console;// Output 1982/03/16console;// Output 1982-03-16console;// Output 03-16-1982console;// Output 16-03-1982console;// Output 03*16&1982
Get a giving date's string with a giving pattern You can use either a string or a Date object for the date source.
console;// Output 1982/03/16console;// Output 1982-03-16console;// Output 1982-03-16
License
Date-lib is licensed under MIT License - see the License file.