MySQL Date for Javascript
extends javascript's Date object with four new methods designed to assist with handling MySQL Timestamps.
Examples
toMysqlDate & toMysqlUTCDate methods:
var date = ;date; // Outputs: '2016-08-28 22:45:37' (String)date; // Outputs: '2016-08-28 19:45:37' (String)
fromMysqlDate & fromMysqlUTCDate methods:
Date; // Outputs: (Date object)Date; // Outputs: (Date object)
Installtion
Installation Using NPM
npm install mysqldate
Usage:
;
Installation Using Bower
bower install mysqldate
Insert before your scripts: