package
Pretty datetime: `2014-01-09 06:46:01`
npm install date-timeGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Pretty datetime:
2014-01-09 06:46:01
$ npm install date-timeimport dateTime from 'date-time';
dateTime();
//=> '2017-05-20 17:07:05'
dateTime({date: new Date(1989, 2, 4, 10)});
//=> '1989-03-04 09:00:00'
dateTime({showTimeZone: true});
//=> '2017-05-20 17:07:05 UTC+7'
dateTime({local: false});
//=> '2017-05-20 10:07:05'
dateTime({local: false, showTimeZone: true});
//=> '2017-05-20 10:07:05 UTC'
dateTime({showMilliseconds: true});
//=> '2017-05-20 17:07:05 6ms'Type: object
Type: Date
Default: new Date()
Custom date.
Type: boolean
Default: true
Show the date in the local time zone.
Type: boolean
Default: false
Show the UTC time zone postfix.
Type: boolean
Default: false
Show the milliseconds in the date if any.
Estimated unpacked size across 2 packages.
6.8 kB
Includes dependencies.