Created
July 15, 2015 07:21
-
-
Save serhatcan/cd585b405bab3520349f to your computer and use it in GitHub Desktop.
Writes avaliable timezones used in MomentJS. Download moment.js and moment-timezone-with-data.js and put them in the same directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="moment.min.js"></script> | |
<script src="moment-timezone-with-data.js"></script> | |
</head> | |
<body> | |
<p id="demo"></p> | |
<script> | |
var timezones = moment.tz.names(); | |
var text = ""; | |
var i; | |
for (i = 0; i < timezones.length; i++) { | |
text += "{name:\"" + timezones[i] + "\"}, <br />"; | |
} | |
document.getElementById("demo").innerHTML = text; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment