Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

timezone-compute

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timezone-compute

A timezone library with timezone conversion functions

  • 0.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

timezone-compute

build status Coverage Status gemnasium Dependency Status Davis Dependency status

NPM

browser support

A timezone library with timezone conversion functions

Example

The main usage is converting recurring weekly times from one timezone to another.

var timezone = require("timezone-compute")

// date is a Moment Date object.
var date = timezone.time("America/Los_Angeles", Date.now())

var thisWeek = timezone.getISOWeek()
// Monday 9AM this week in America/Los_Angeles
var date2 = timezone.computeUTC({
  timezone: "America/Los_Angeles",
  minute: 0,
  hour: 9,
  day: 1,
  week: thisWeek.week,
  year: thisWeek.year
})

// that time in someone elses timezone
var date3 = timezone.time("America/New_York", date2)

Installation

npm install timezone-compute

Contributors

  • Raynos

MIT Licenced

FAQs

Package last updated on 21 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc