timezone-compute

A timezone library with timezone conversion functions

npm install timezone-compute
1 downloads in the last day
1 downloads in the last week
11 downloads in the last month

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

npm loves you