| 1 |
/***************************************************************************** |
| 2 |
* FILE: anytimetz.js - The Any+Time(TM) JavaScript Library |
| 3 |
* Basic Time Zone Support (source) |
| 4 |
* VERSION: 4.1112 |
| 5 |
* |
| 6 |
* Copyright 2010 Andrew M. Andrews III (www.AMA3.com). Some Rights |
| 7 |
* Reserved. This work licensed under the Creative Commons Attribution- |
| 8 |
* Noncommercial-Share Alike 3.0 Unported License except in jurisdicitons |
| 9 |
* for which the license has been ported by Creative Commons International, |
| 10 |
* where the work is licensed under the applicable ported license instead. |
| 11 |
* For a copy of the unported license, visit |
| 12 |
* http://creativecommons.org/licenses/by-nc-sa/3.0/ |
| 13 |
* or send a letter to Creative Commons, 171 Second Street, Suite 300, |
| 14 |
* San Francisco, California, 94105, USA. For ported versions of the |
| 15 |
* license, visit http://creativecommons.org/international/ |
| 16 |
* |
| 17 |
* Alternative licensing arrangements may be made by contacting the |
| 18 |
* author at http://www.AMA3.com/contact/ |
| 19 |
* |
| 20 |
* This file adds basic labels for major time zones to the Any+Time(TM) |
| 21 |
* JavaScript Library. Time zone support is extremely complicated, and |
| 22 |
* ECMA-262 (JavaScript) provides little support. Developers are expected |
| 23 |
* to tailor this file to meet their needs, mostly by removing lines that |
| 24 |
* are not required by their users, and/or by removing either abbreviated |
| 25 |
* (before double-dash) or long (after double-dash) names from the strings. |
| 26 |
* |
| 27 |
* Note that there is no automatic detection of daylight savings time |
| 28 |
* (AKA summer time), due to lack of support in JavaScript and the |
| 29 |
* time-prohibitive complexity of attempting such support in code. |
| 30 |
* If you want to take a stab at it, let me know; if you want to pay me |
| 31 |
* large sums of money to add it, again, let me know. :-p |
| 32 |
* |
| 33 |
* This file should be included AFTER anytime.js (or anytimec.js) in any |
| 34 |
* HTML page that requires it. |
| 35 |
* |
| 36 |
* Any+Time is a trademark of Andrew M. Andrews III. |
| 37 |
****************************************************************************/ |
| 38 |
|
| 39 |
//============================================================================= |
| 40 |
// AnyTime.utcLabel is an array of arrays, indexed by UTC offset IN MINUTES |
| 41 |
// (not hours-and-minutes). This is used by AnyTime.Converter to display |
| 42 |
// time zone labels when the "%@" format specifier is used. It is also used |
| 43 |
// by AnyTime.widget() to determine which time zone labels to offer as valid |
| 44 |
// choices when a user attempts to change the time zone. NOTE: Positive |
| 45 |
// indicies are NOT signed. |
| 46 |
// |
| 47 |
// Each sub-array contains a series of strings, each of which is a label |
| 48 |
// for a time-zone having the corresponding UTC offset. The first string in |
| 49 |
// each sub-array is the default label for that UTC offset (the one used by |
| 50 |
// AnyTime.Converter.format() if utcFormatOffsetSubIndex is not specified and |
| 51 |
// setUtcFormatOffsetSubIndex() is not called. |
| 52 |
//============================================================================= |
| 53 |
|
| 54 |
AnyTime.utcLabel = []; |
| 55 |
AnyTime.utcLabel[-720]=[ |
| 56 |
'BIT--Baker Island Time' |
| 57 |
]; |
| 58 |
AnyTime.utcLabel[-660]=[ |
| 59 |
'SST--Samoa Standard Time' |
| 60 |
]; |
| 61 |
AnyTime.utcLabel[-600]=[ |
| 62 |
'CKT--Cook Island Time' |
| 63 |
,'HAST--Hawaii-Aleutian Standard Time' |
| 64 |
,'TAHT--Tahiti Time' |
| 65 |
]; |
| 66 |
AnyTime.utcLabel[-540]=[ |
| 67 |
'AKST--Alaska Standard Time' |
| 68 |
,'GIT--Gambier Island Time' |
| 69 |
]; |
| 70 |
AnyTime.utcLabel[-510]=[ |
| 71 |
'MIT--Marquesas Islands Time' |
| 72 |
]; |
| 73 |
AnyTime.utcLabel[-480]=[ |
| 74 |
'CIST--Clipperton Island Standard Time' |
| 75 |
,'PST--Pacific Standard Time (North America)' |
| 76 |
]; |
| 77 |
AnyTime.utcLabel[-420]=[ |
| 78 |
'MST--Mountain Standard Time (North America)' |
| 79 |
,'PDT--Pacific Daylight Time (North America)' |
| 80 |
]; |
| 81 |
AnyTime.utcLabel[-360]=[ |
| 82 |
'CST--Central Standard Time (North America)' |
| 83 |
,'EAST--Easter Island Standard Time' |
| 84 |
,'GALT--Galapagos Time' |
| 85 |
,'MDT--Mountain Daylight Time (North America)' |
| 86 |
]; |
| 87 |
AnyTime.utcLabel[-300]=[ |
| 88 |
'CDT--Central Daylight Time (North America)' |
| 89 |
,'COT--Colombia Time' |
| 90 |
,'ECT--Ecuador Time' |
| 91 |
,'EST--Eastern Standard Time (North America)' |
| 92 |
]; |
| 93 |
AnyTime.utcLabel[-240]=[ |
| 94 |
'AST--Atlantic Standard Time' |
| 95 |
,'BOT--Bolivia Time' |
| 96 |
,'CLT--Chile Standard Time' |
| 97 |
,'COST--Colombia Summer Time' |
| 98 |
,'ECT--Eastern Caribbean Time' |
| 99 |
,'EDT--Eastern Daylight Time (North America)' |
| 100 |
,'FKST--Falkland Islands Standard Time' |
| 101 |
,'GYT--Guyana Time' |
| 102 |
]; |
| 103 |
AnyTime.utcLabel[-210]=[ |
| 104 |
'VET--Venezuelan Standard Time' |
| 105 |
]; |
| 106 |
AnyTime.utcLabel[-180]=[ |
| 107 |
'ART--Argentina Time' |
| 108 |
,'BRT--Brasilia Time' |
| 109 |
,'CLST--Chile Summer Time' |
| 110 |
,'GFT--French Guiana Time' |
| 111 |
,'UYT--Uruguay Standard Time' |
| 112 |
]; |
| 113 |
AnyTime.utcLabel[-150]=[ |
| 114 |
'NT--Newfoundland Time' |
| 115 |
]; |
| 116 |
AnyTime.utcLabel[-120]=[ |
| 117 |
'GST--South Georgia and the South Sandwich Islands' |
| 118 |
,'UYST--Uruguay Summer Time' |
| 119 |
]; |
| 120 |
AnyTime.utcLabel[-90]=[ |
| 121 |
'NDT--Newfoundland Daylight Time' |
| 122 |
]; |
| 123 |
AnyTime.utcLabel[-60]=[ |
| 124 |
'AZOST--Azores Standard Time' |
| 125 |
,'CVT--Cape Verde Time' |
| 126 |
]; |
| 127 |
AnyTime.utcLabel[0]=[ |
| 128 |
'GMT--Greenwich Mean Time' |
| 129 |
,'WET--Western European Time' |
| 130 |
]; |
| 131 |
AnyTime.utcLabel[60]=[ |
| 132 |
'BST--British Summer Time' |
| 133 |
,'CET--Central European Time' |
| 134 |
]; |
| 135 |
AnyTime.utcLabel[60]=[ |
| 136 |
'WAT--West Africa Time' |
| 137 |
,'WEST--Western European Summer Time' |
| 138 |
]; |
| 139 |
AnyTime.utcLabel[120]=[ |
| 140 |
'CAT--Central Africa Time' |
| 141 |
,'CEST--Central European Summer Time' |
| 142 |
,'EET--Eastern European Time' |
| 143 |
,'IST--Israel Standard Time' |
| 144 |
,'SAST--South African Standard Time' |
| 145 |
]; |
| 146 |
AnyTime.utcLabel[180]=[ |
| 147 |
'AST--Arab Standard Time (Kuwait/Riyadh)' |
| 148 |
,'AST--Arabic Standard Time (Baghdad)' |
| 149 |
,'EAT--East Africa Time' |
| 150 |
,'EEST--Eastern European Summer Time' |
| 151 |
,'MSK--Moscow Standard Time' |
| 152 |
]; |
| 153 |
AnyTime.utcLabel[210]=[ |
| 154 |
'IRST--Iran Standard Time' |
| 155 |
]; |
| 156 |
AnyTime.utcLabel[240]=[ |
| 157 |
'AMT--Armenia Time' |
| 158 |
,'AST--Arabian Standard Time (Abu Dhabi/Muscat)' |
| 159 |
,'AZT--Azerbaijan Time' |
| 160 |
,'GET--Georgia Standard Time' |
| 161 |
,'MUT--Mauritius Time' |
| 162 |
,'RET--R�union Time' |
| 163 |
,'SAMT--Samara Time' |
| 164 |
,'SCT--Seychelles Time' |
| 165 |
]; |
| 166 |
AnyTime.utcLabel[270]=[ |
| 167 |
'AFT--Afghanistan Time' |
| 168 |
]; |
| 169 |
AnyTime.utcLabel[300]=[ |
| 170 |
'AMST--Armenia Summer Time' |
| 171 |
,'HMT--Heard and McDonald Islands Time' |
| 172 |
,'PKT--Pakistan Standard Time' |
| 173 |
,'YEKT--Yekaterinburg Time' |
| 174 |
]; |
| 175 |
AnyTime.utcLabel[330]=[ |
| 176 |
'IST--Indian Standard Time' |
| 177 |
,'SLT--Sri Lanka Time' |
| 178 |
]; |
| 179 |
AnyTime.utcLabel[345]=[ |
| 180 |
'NPT--Nepal Time' |
| 181 |
]; |
| 182 |
AnyTime.utcLabel[360]=[ |
| 183 |
'BIOT--British Indian Ocean Time' |
| 184 |
,'BST--Bangladesh Standard Time' |
| 185 |
,'BTT--Bhutan Time' |
| 186 |
,'OMST--Omsk Time' |
| 187 |
]; |
| 188 |
AnyTime.utcLabel[390]=[ |
| 189 |
'CCT--Cocos Islands Time' |
| 190 |
,'MST--Myanmar Standard Time' |
| 191 |
]; |
| 192 |
AnyTime.utcLabel[420]=[ |
| 193 |
'CXT--Christmas Island Time' |
| 194 |
,'KRAT--Krasnoyarsk Time' |
| 195 |
,'THA--Thailand Standard Time' |
| 196 |
]; |
| 197 |
AnyTime.utcLabel[480]=[ |
| 198 |
'ACT--ASEAN Common Time' |
| 199 |
,'AWST--Australian Western Standard Time' |
| 200 |
,'BDT--Brunei Time' |
| 201 |
,'CST--China Standard Time' |
| 202 |
,'HKT--Hong Kong Time' |
| 203 |
,'IRKT--Irkutsk Time' |
| 204 |
,'MST--Malaysian Standard Time' |
| 205 |
,'PST--Philippine Standard Time' |
| 206 |
,'SST--Singapore Standard Time' |
| 207 |
]; |
| 208 |
AnyTime.utcLabel[540]=[ |
| 209 |
'JST--Japan Standard Time' |
| 210 |
,'KST--Korea Standard Time' |
| 211 |
,'YAKT--Yakutsk Time' |
| 212 |
]; |
| 213 |
AnyTime.utcLabel[570]=[ |
| 214 |
'ACST--Australian Central Standard Time' |
| 215 |
]; |
| 216 |
AnyTime.utcLabel[600]=[ |
| 217 |
'AEST--Australian Eastern Standard Time' |
| 218 |
,'ChST--Chamorro Standard Time' |
| 219 |
,'VLAT--Vladivostok Time' |
| 220 |
]; |
| 221 |
AnyTime.utcLabel[630]=[ |
| 222 |
'LHST--Lord Howe Standard Time' |
| 223 |
]; |
| 224 |
AnyTime.utcLabel[660]=[ |
| 225 |
'MAGT--Magadan Time' |
| 226 |
,'SBT--Solomon Islands Time' |
| 227 |
]; |
| 228 |
AnyTime.utcLabel[690]=[ |
| 229 |
'NFT--Norfolk Time' |
| 230 |
]; |
| 231 |
AnyTime.utcLabel[720]=[ |
| 232 |
'FJT--Fiji Time' |
| 233 |
,'GILT--Gilbert Island Time' |
| 234 |
,'PETT--Kamchatka Time' |
| 235 |
]; |
| 236 |
AnyTime.utcLabel[765]=[ |
| 237 |
'CHAST--Chatham Standard Time' |
| 238 |
]; |
| 239 |
AnyTime.utcLabel[780]=[ |
| 240 |
'PHOT--Phoenix Island Time' |
| 241 |
]; |
| 242 |
AnyTime.utcLabel[840]=[ |
| 243 |
'LINT--Line Islands Time' |
| 244 |
]; |