node package manager

date-time

Pretty UTC datetime: 2014-01-09 06:46:01 UTC

date-time

Pretty UTC datetime: 2014-01-09 06:46:01 UTC

$ npm install --save date-time
const dateTime = require('date-time');
 
dateTime();
//=> '2016-07-20 11:24:28 UTC' 
 
dateTime(new Date(1989, 2, 4, 10));
//=> '1989-03-04 09:00:00 UTC' 
 
dateTime(new Date(), {local: true});
//=> '2016-07-20 13:24:28 UTC+2' 

Type: Date
Default: new Date()

Custom date.

Type: Object

Type: boolean
Default: false

Show the date in the local time zone.

MIT © Sindre Sorhus