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

timezonelist-js

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

timezonelist-js

List of time zones you can use for your dropdown forms.

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
276
decreased by-8.91%
Maintainers
1
Weekly downloads
 
Created
Source

Timezone List

=== List of time zones you can use for your dropdown forms.

alt text

Installation

$ npm install timezonelist-js

Usage

var tzlist = // require('timezonelist-js') assuming tzlist in used on the backend and passed as javascript object to front-end
var select = document.getElementById("timezone") //get your <select></select> element

for (var i = 0; i < tzlist.length; i++) {
	var timezone = tzlist[i]
	select.options[i] = new Option(timezone.text, timezone.value)
}

Custom text


var text = timezone.place + ' (UTC' + timezone.time + ')'
select.options[i] = new Option(text, timezone.value)

Output


{ id: 'Pacific/Midway', value: '(UTC-11:00) Midway Island', place: 'Midway Island', time: '-11:00' }

Keywords

FAQs

Package last updated on 20 Nov 2016

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