@cjser/time-zone
v2.0.0-cjser.2
Published
Pretty time zone: `+2` or `-9:30`
Maintainers
Readme
time-zone
Pretty time zone:
+2or-9:30
Install
$ npm install time-zoneUsage
import timeZone from 'time-zone';
// Current time zone (in Norway)
timeZone();
//=> '+2'
// Time zone in February (in Norway)
timeZone(new Date(2016, 1, 1));
//=> '+1'
// Current time zone (in French Polynesia)
timeZone();
//=> '-9:30'API
timeZone(date?)
date
Type: Date
Default: new Date()
Custom date.
cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/time-zone
