Socket
Socket
Sign inDemoInstall

better-timezone-latest

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    better-timezone-latest

A jquery plugin for making sane timezone selects.


Version published
Weekly downloads
36
increased by9.09%
Maintainers
1
Install size
391 kB
Created
Weekly downloads
 

Readme

Source

Better Timezone Build Status

A jQuery plugin for making sane timezone selects. - Fork with latest version

What it looks like

This jQuery plugin creates a simple, configurable dropdown and autocomplete element. For some reason, this hasn't really been solved yet. Timezones are pretty weird and vary year to year, so we've compiled and cross-checked several different data sources:

  • IANA timezone database
  • Microsoft timezone database
  • Unicode Common Locale Data Repository

Dependencies

  • jQuery
  • Select2

Plugin Size

~20kb total

Fork updates

So far, version update to 0.0.5. In the future:

  • Fix default timezone pick to new Intl API.
  • Better configuration

Usage

  1. Include jQuery and Select2:
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0-rc.1/css/select2.min.css" rel="stylesheet" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0-rc.1/js/select2.full.min.js"></script>
  1. Include plugin's code:
<script src="dist/better-timezone.min.js"></script>
  1. Include your target element:
<select id="element">
  <option value="" disabled selected>Please select a timezone</option>
</script>
  1. Call the plugin:
$("#element").betterTimezone({
  showIANA: false,
  showOptgroups: false
});

Options

showIANA

Boolean: make better-timezone include all IANA classification geolocations.

showOptgroups

optgroups and IANA

Boolean: make better-timezone group IANA locations into their respective timezone categories with <optgroup> elements. Cannot be true when showIANA is false

Contributing

Check CONTRIBUTING.md for more information.

History

Check Releases for detailed changelog.

License

The MIT License (MIT) Copyright © 2015 Clara Labs, https://www.claralabs.com

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.

Keywords

FAQs

Last updated on 17 Jul 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc