date-time
Pretty datetime: 2014-01-09 06:46:01
Install
$ npm install date-time
Usage
import dateTime from 'date-time';
dateTime();
dateTime({date: new Date(1989, 2, 4, 10)});
dateTime({showTimeZone: true});
dateTime({local: false});
dateTime({local: false, showTimeZone: true});
dateTime({showMilliseconds: true});
API
dateTime(options?)
options
Type: object
date
Type: Date
Default: new Date()
Custom date.
local
Type: boolean
Default: true
Show the date in the local time zone.
showTimeZone
Type: boolean
Default: false
Show the UTC time zone postfix.
showMilliseconds
Type: boolean
Default: false
Show the milliseconds in the date if any.