time-zone

WebJar for time-zone

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

time-zone
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

time-zone
WebJar for time-zone
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/time-zone

Download time-zone

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/time-zone/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>time-zone</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/time-zone/
implementation 'org.webjars.npm:time-zone:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/time-zone/
implementation ("org.webjars.npm:time-zone:1.0.0")
'org.webjars.npm:time-zone:jar:1.0.0'
<dependency org="org.webjars.npm" name="time-zone" rev="1.0.0">
  <artifact name="time-zone" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='time-zone', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "time-zone" % "1.0.0"
[org.webjars.npm/time-zone "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

time-zone Build Status

Pretty time zone: +2 or -9:30

Install

$ npm install 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.

Versions

Version
1.0.0