rails-timezone

1.1.0 • Public • Published

rails-timezone-js

The ActiveSupport TimeZone class uses a time zone name format that differs from the format uses by the standard Time Zone Database, maintained by the IANA.

rails-timezone-js provides functions to convert to and from the ActiveSupport time zone names, using the mapping found in ActiveSupport.

This library can be used in both node.js and the browser.

Usage

The library provides two functions:

  • from(timezone): Convert from an ActiveSupport time zone name
  • to(tz): Convert to an ActiveSupport time zone name

node.js

npm install rails-timezone

Browser

The functions are exposed via window.RailsTimeZone

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.06,313latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.06,313
1.0.043

Package Sidebar

Install

npm i rails-timezone

Weekly Downloads

6,356

Version

1.1.0

License

none

Last publish

Collaborators

  • davidwood