SJAnderson / js-timezone-abbr-map

Timezone Map for Dropdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Javascript Timezone Abbreviation Map

  • maps from timezone offsets to common timezone abbreviations
  • shows different values based on Daylight Savings Time
  • during standard time, -7:00 shows MST, -8:00 shows PST
  • during daylight savings time, -7:00 shows PDT, -8:00 shows AKDT

Usage with jquery-datetime and chosen

@$el.find("input[data-type=datetime]").datetime {
  on:
    open: (el) ->
      el.find('select').chosen()
}

Preview

preview1

preview2

Contributing

I chose what seemed like they would be well known time zone abbreviations for each zone. If you live in a zone and the abbreviation isn't obvious, let us know and it can be updated.

References

Changelog

v1.1.0 (06-01-2014)

  • change output to more standard "GMT-0700 (PDT)"

v1.0.0 (05-16-2014)

  • intitial commit
  • timezone maps based that change based on daylight savings time

License

©2014 Bryant Williams under the MIT license:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Timezone Map for Dropdown


Languages

Language:CoffeeScript 100.0%