Skip to content
ed9506bbaf
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
May 13, 2020 11:13
May 13, 2020 11:13
May 13, 2020 11:13

time-zone Build Status

Pretty time zone: +2 or -9:30

Install

$ npm install --save time-zone

Usage

const timeZone = require('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.

License

MIT © Sindre Sorhus