The lastest version of this document is available on Github > datetime-object

Main Contents

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

<script src="../node_modules/moment/min/moment.min.js"></script> <script src="../node_modules/datetime-object/distrib/datetime-object.min.js"></script>

in Node.js

require("datetime-object");

usage

var dt=new DateTime(); console.log(dt.toString());