This Section dateTime-object was designed to work both with all browsers and with Node.js. It's a refactoring of momentjs for clean API and working with Objects. It requires moment.
Installation
npm install datetime-object --save
OR
yarn install datetime-object --save
References
in browser
in Node.js
require("datetime-object");
usage
var dt=new DateTime();
console.log(dt.toString());