API  0.9.10
CPTimeZone.j
Go to the documentation of this file.
1 /* CPTimeZone.j
2 * Foundation
3 *
4 * Created by Alexandre Wilhelm
5 * Copyright 2012 <[email protected]>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21 
22 
23 
30 
31 CPSystemTimeZoneDidChangeNotification = @"CPSystemTimeZoneDidChangeNotification";
32 
41 
46 @implementation CPTimeZone : CPObject
47 {
48  CPData _data;
49  CPInteger _secondsFromGMT;
50  CPString _abbreviation;
51  CPString _name;
52 }
53 
56 + (void)initialize
57 {
58  if (self !== [CPTimeZone class])
59  return;
60 
62  @"America/Halifax",
63  @"America/Juneau",
64  @"America/Juneau",
65  @"America/Argentina/Buenos_Aires",
66  @"America/Halifax",
67  @"Asia/Dhaka",
68  @"America/Sao_Paulo",
69  @"America/Sao_Paulo",
70  @"Europe/London",
71  @"Africa/Harare",
72  @"America/Chicago",
73  @"Europe/Paris",
74  @"Europe/Paris",
75  @"America/Santiago",
76  @"America/Santiago",
77  @"America/Bogota",
78  @"America/Chicago",
79  @"Africa/Addis_Ababa",
80  @"America/New_York",
81  @"Europe/Istanbul",
82  @"Europe/Istanbul",
83  @"America/New_York",
84  @"GMT",
85  @"Asia/Dubai",
86  @"Asia/Hong_Kong",
87  @"Pacific/Honolulu",
88  @"Asia/Bangkok",
89  @"Asia/Tehran",
90  @"Asia/Calcutta",
91  @"Asia/Tokyo",
92  @"Asia/Seoul",
93  @"America/Denver",
94  @"Europe/Moscow",
95  @"Europe/Moscow",
96  @"America/Denver",
97  @"Pacific/Auckland",
98  @"Pacific/Auckland",
99  @"America/Los_Angeles",
100  @"America/Lima",
101  @"Asia/Manila",
102  @"Asia/Karachi",
103  @"America/Los_Angeles",
104  @"Asia/Singapore",
105  @"UTC",
106  @"Africa/Lagos",
107  @"Europe/Lisbon",
108  @"Europe/Lisbon",
109  @"Asia/Jakarta"
110  ];
111 
113  @"ADT" : @"America/Halifax",
114  @"AKDT" : @"America/Juneau",
115  @"AKST" : @"America/Juneau",
116  @"ART" : @"America/Argentina/Buenos_Aires",
117  @"AST" : @"America/Halifax",
118  @"BDT" : @"Asia/Dhaka",
119  @"BRST" : @"America/Sao_Paulo",
120  @"BRT" : @"America/Sao_Paulo",
121  @"BST" : @"Europe/London",
122  @"CAT" : @"Africa/Harare",
123  @"CDT" : @"America/Chicago",
124  @"CEST" : @"Europe/Paris",
125  @"CET" : @"Europe/Paris",
126  @"CLST" : @"America/Santiago",
127  @"CLT" : @"America/Santiago",
128  @"COT" : @"America/Bogota",
129  @"CST" : @"America/Chicago",
130  @"EAT" : @"Africa/Addis_Ababa",
131  @"EDT" : @"America/New_York",
132  @"EEST" : @"Europe/Istanbul",
133  @"EET" : @"Europe/Istanbul",
134  @"EST" : @"America/New_York",
135  @"GMT" : @"GMT",
136  @"GST" : @"Asia/Dubai",
137  @"HKT" : @"Asia/Hong_Kong",
138  @"HST" : @"Pacific/Honolulu",
139  @"ICT" : @"Asia/Bangkok",
140  @"IRST" : @"Asia/Tehran",
141  @"IST" : @"Asia/Calcutta",
142  @"JST" : @"Asia/Tokyo",
143  @"KST" : @"Asia/Seoul",
144  @"MDT" : @"America/Denver",
145  @"MSD" : @"Europe/Moscow",
146  @"MSK" : @"Europe/Moscow",
147  @"MST" : @"America/Denver",
148  @"NZDT" : @"Pacific/Auckland",
149  @"NZST" : @"Pacific/Auckland",
150  @"PDT" : @"America/Los_Angeles",
151  @"PET" : @"America/Lima",
152  @"PHT" : @"Asia/Manila",
153  @"PKT" : @"Asia/Karachi",
154  @"PST" : @"America/Los_Angeles",
155  @"SGT" : @"Asia/Singapore",
156  @"UTC" : @"UTC",
157  @"WAT" : @"Africa/Lagos",
158  @"WEST" : @"Europe/Lisbon",
159  @"WET" : @"Europe/Lisbon",
160  @"WIT" : @"Asia/Jakarta"
161  };
162 
164  @"ADT" : -180,
165  @"AKDT" : -480,
166  @"AKST" : -540,
167  @"ART" : -180,
168  @"AST" : -240,
169  @"BDT" : 360,
170  @"BRST" : -120,
171  @"BRT" : -180,
172  @"BST" : 60,
173  @"CAT" : 120,
174  @"CDT" : -300,
175  @"CEST" : 120,
176  @"CET" : 60,
177  @"CLST" : -180,
178  @"CLT" : -240,
179  @"COT" : -300,
180  @"CST" : -360,
181  @"EAT" : 180,
182  @"EDT" : -240,
183  @"EEST" : 180,
184  @"EET" : 120,
185  @"EST" : -300,
186  @"GMT" : 0,
187  @"GST" : 240,
188  @"HKT" : 480,
189  @"HST" : -600,
190  @"ICT" : 420,
191  @"IRST" : 210,
192  @"IST" : 330,
193  @"JST" : 540,
194  @"KST" : 540,
195  @"MDT" : -300,
196  @"MSD" : 240,
197  @"MSK" : 240,
198  @"MST" : -420,
199  @"NZDT" : 900,
200  @"NZST" : 900,
201  @"PDT" : -420,
202  @"PET" : -300,
203  @"PHT" : 480,
204  @"PKT" : 300,
205  @"PST" : -480,
206  @"SGT" : 480,
207  @"UTC" : 0,
208  @"WAT" : -540,
209  @"WEST" : 60,
210  @"WET" : 0,
211  @"WIT" : 540
212  };
213 
214  var englishLocalizedName = @{
215  @"EDT" : [@"Eastern Standard Time", @"EST", @"Eastern Daylight Time", @"EDT", @"Eastern Time", @"ET"],
216  @"GMT" : [@"GMT", @"GMT", @"GMT", @"GMT", @"GMT", @"GMT"],
217  @"AST" : [@"Atlantic Standard Time", @"AST", @"Atlantic Daylight Time", @"ADT", @"Atlantic Time", @"AT"],
218  @"IRST" : [@"Iran Standard Time", @"GMT+03:30", @"Iran Daylight Time", @"GMT+03:30", @"Iran Time", @"Iran Time"],
219  @"ICT" : [@"Indochina Time", @"GMT+07:00", @"GMT+07:00", @"GMT+07:00", @"Indochina Time", @"Thailand Time"],
220  @"PET" : [@"Peru Standard Time", @"GMT-05:00", @"Peru Summer Time", @"GMT-05:00", @"Peru Standard Time", @"Peru Time"],
221  @"KST" : [@"Korean Standard Time", @"GMT+09:00", @"Korean Daylight Time", @"GMT+09:00", @"Korean Standard Time", @"South Korea Time"],
222  @"PST" : [@"Pacific Standard Time", @"PST", @"Pacific Daylight Time", @"PDT", @"Pacific Time", @"PT"],
223  @"CDT" : [@"Central Standard Time", @"CST", @"Central Daylight Time", @"CDT", @"Central Time", @"CT"],
224  @"EEST" : [@"Eastern European Standard Time", @"GMT+02:00", @"Eastern European Summer Time", @"GMT+03:00", @"Eastern European Time", @"Turkey Time"],
225  @"NZDT" : [@"New Zealand Standard Time", @"GMT+12:00", @"New Zealand Daylight Time", @"GMT+13:00", @"New Zealand Time", @"New Zealand Time (Auckland)"],
226  @"WEST" : [@"Western European Standard Time", @"GMT", @"Western European Summer Time", @"GMT+01:00", @"Western European Time", @"Portugal Time (Lisbon)"],
227  @"EAT" : [@"East Africa Time", @"GMT+03:00", @"GMT+03:00", @"GMT+03:00", @"East Africa Time", @"Ethiopia Time"],
228  @"HKT" : [@"Hong Kong Standard Time", @"GMT+08:00", @"Hong Kong Summer Time", @"GMT+08:00", @"Hong Kong Standard Time", @"Hong Kong SAR China Time"],
229  @"IST" : [@"India Standard Time", @"GMT+05:30", @"GMT+05:30", @"GMT+05:30", @"India Standard Time", @"India Time"],
230  @"MDT" : [@"Mountain Standard Time", @"MST", @"Mountain Daylight Time", @"MDT", @"Mountain Time", @"MT"],
231  @"NZST" : [@"New Zealand Standard Time", @"GMT+12:00", @"New Zealand Daylight Time", @"GMT+13:00", @"New Zealand Time", @"New Zealand Time (Auckland)"],
232  @"WIT" : [@"Western Indonesia Time", @"GMT+07:00", @"GMT+07:00", @"GMT+07:00", @"Western Indonesia Time", @"Indonesia Time (Jakarta)"],
233  @"ADT" : [@"Atlantic Standard Time", @"AST", @"Atlantic Daylight Time", @"ADT", @"Atlantic Time", @"AT"],
234  @"BST" : [@"Greenwich Mean Time", @"GMT", @"British Summer Time", @"GMT+01:00", @"United Kingdom Time", @"United Kingdom Time"],
235  @"ART" : [@"Argentina Standard Time", @"GMT-03:00", @"Argentina Summer Time", @"GMT-03:00", @"Argentina Standard Time", @"Argentina Time (Buenos Aires)"],
236  @"CAT" : [@"Central Africa Time", @"GMT+02:00", @"GMT+02:00", @"GMT+02:00", @"Central Africa Time", @"Zimbabwe Time"],
237  @"GST" : [@"Gulf Standard Time", @"GMT+04:00", @"GMT+04:00", @"GMT+04:00", @"Gulf Standard Time", @"United Arab Emirates Time"],
238  @"PDT" : [@"Pacific Standard Time", @"PST", @"Pacific Daylight Time", @"PDT", @"Pacific Time", @"PT"],
239  @"SGT" : [@"Singapore Standard Time", @"GMT+08:00", @"GMT+08:00", @"GMT+08:00", @"Singapore Standard Time", @"Singapore Time"],
240  @"COT" : [@"Colombia Standard Time", @"GMT-05:00", @"Colombia Summer Time", @"GMT-05:00", @"Colombia Standard Time", @"Colombia Time"],
241  @"PKT" : [@"Pakistan Standard Time", @"GMT+05:00", @"Pakistan Summer Time", @"GMT+05:00", @"Pakistan Standard Time", @"Pakistan Time"],
242  @"EET" : [@"Eastern European Standard Time", @"GMT+02:00", @"Eastern European Summer Time", @"GMT+03:00", @"Eastern European Time", @"Turkey Time"],
243  @"UTC" : [@"GMT", @"GMT", @"GMT", @"GMT", @"GMT", @"GMT"],
244  @"WAT" : [@"West Africa Standard Time", @"GMT+01:00", @"West Africa Summer Time", @"GMT+01:00", @"West Africa Standard Time", @"Nigeria Time"],
245  @"EST" : [@"Eastern Standard Time", @"EST", @"Eastern Daylight Time", @"EDT", @"Eastern Time", @"ET"],
246  @"JST" : [@"Japan Standard Time", @"GMT+09:00", @"Japan Daylight Time", @"GMT+09:00", @"Japan Standard Time", @"Japan Time"],
247  @"CLST" : [@"Chile Standard Time", @"GMT-04:00", @"Chile Summer Time", @"GMT-04:00", @"Chile Time", @"Chile Time (Santiago)"],
248  @"CET" : [@"Central European Standard Time", @"GMT+01:00", @"Central European Summer Time", @"GMT+02:00", @"Central European Time", @"France Time"],
249  @"BDT" : [@"Bangladesh Standard Time", @"GMT+06:00", @"Bangladesh Summer Time", @"GMT+06:00", @"Bangladesh Standard Time", @"Bangladesh Time"],
250  @"MSK" : [@"Moscow Standard Time", @"GMT+04:00", @"Moscow Summer Time", @"GMT+04:00", @"Moscow Standard Time", @"Russia Time (Moscow)"],
251  @"AKDT" : [@"Alaska Standard Time", @"AKST", @"Alaska Daylight Time", @"AKDT", @"Alaska Time", @"AKT"],
252  @"CLT" : [@"Chile Standard Time", @"GMT-04:00", @"Chile Summer Time", @"GMT-04:00", @"Chile Time", @"Chile Time (Santiago)"],
253  @"AKST" : [@"Alaska Standard Time", @"AKST", @"Alaska Daylight Time", @"AKDT", @"Alaska Time", @"AKT"],
254  @"BRST" : [@"Brasilia Standard Time", @"GMT-03:00", @"Brasilia Summer Time", @"GMT-03:00", @"Brasilia Time", @"Brazil Time (Sao Paulo)"],
255  @"BRT" : [@"Brasilia Standard Time", @"GMT-03:00", @"Brasilia Summer Time", @"GMT-03:00", @"Brasilia Time", @"Brazil Time (Sao Paulo)"],
256  @"CEST" : [@"Central European Standard Time", @"GMT+01:00", @"Central European Summer Time", @"GMT+02:00", @"Central European Time", @"France Time"],
257  @"CST" : [@"Central Standard Time", @"CST", @"Central Daylight Time", @"CDT", @"Central Time", @"CT"],
258  @"HST" : [@"Hawaii-Aleutian Standard Time", @"HST", @"Hawaii-Aleutian Daylight Time", @"HDT", @"Hawaii-Aleutian Standard Time", @"HST"],
259  @"MSD" : [@"Moscow Standard Time", @"GMT+04:00", @"Moscow Summer Time", @"GMT+04:00", @"Moscow Standard Time", @"Russia Time (Moscow)"],
260  @"MST" : [@"Mountain Standard Time", @"MST", @"Mountain Daylight Time", @"MDT", @"Mountain Time", @"MT"],
261  @"PHT" : [@"Philippine Standard Time", @"GMT+08:00", @"Philippine Summer Time", @"GMT+08:00", @"Philippine Standard Time", @"Philippines Time"],
262  @"WET" : [@"Western European Standard Time", @"GMT", @"Western European Summer Time", @"GMT+01:00", @"Western European Time", @"Portugal Time (Lisbon)"]
263  };
264 
265  var date = [CPDate date],
266  abbreviation = String(String(date).split("(")[1]).split(")")[0];
267 
268  localTimeZone = [self timeZoneWithAbbreviation:abbreviation];
269  systemTimeZone = [self timeZoneWithAbbreviation:abbreviation];
270  defaultTimeZone = [self timeZoneWithAbbreviation:abbreviation];
271 
272  localizedName = @{
273  @"en" : englishLocalizedName,
274  @"fr" : @{},
275  @"de" : @{},
276  @"es" : @{}
277  };
278 
279  timeZoneDataVersion = nil;
280 }
281 
282 
283 #pragma mark -
284 #pragma mark Class constructor
285 
291 + (id)timeZoneWithAbbreviation:(CPString)abbreviation
292 {
293  if (![abbreviationDictionary containsKey:abbreviation])
294  return nil;
295 
296  return [[CPTimeZone alloc] _initWithName:[abbreviationDictionary valueForKey:abbreviation] abbreviation:abbreviation];
297 }
298 
305 + (id)timeZoneWithName:(CPString)tzName
306 {
307  return [[CPTimeZone alloc] initWithName:tzName];
308 }
309 
317 + (id)timeZoneWithName:(CPString)tzName data:(CPData)data
318 {
319  return [[CPTimeZone alloc] initWithName:tzName data:data];
320 }
321 
327 + (id)timeZoneForSecondsFromGMT:(CPInteger)seconds
328 {
329  var minutes = seconds / 60,
330  keys = [timeDifferenceFromUTC keyEnumerator],
331  key,
332  abbreviation = nil;
333 
334  while (key = [keys nextObject])
335  {
336  var value = [timeDifferenceFromUTC valueForKey:key];
337 
338  if (value == minutes)
339  {
340  abbreviation = key;
341  break;
342  }
343  }
344 
345  if (!abbreviation)
346  return nil;
347 
348  return [self timeZoneWithAbbreviation:abbreviation];
349 }
350 
353 + (id)_timeZoneFromString:(CPString)aTimeZoneString style:(NSTimeZoneNameStyle)style locale:(CPLocale)_locale
354 {
355  if ([abbreviationDictionary containsKey:aTimeZoneString])
356  return [self timeZoneWithAbbreviation:aTimeZoneString];
357 
358  var dict = [localizedName valueForKey:[_locale objectForKey:CPLocaleLanguageCode]],
359  keys = [dict keyEnumerator],
360  key;
361 
362  while (key = [keys nextObject])
363  {
364  var value = [[dict valueForKey:key] objectAtIndex:style];
365 
366  if ([value isEqualToString:aTimeZoneString])
367  return [self timeZoneWithAbbreviation:key];
368  }
369 
370  return nil;
371 }
372 
375 + (CPArray)_namesForStyle:(NSTimeZoneNameStyle)style locale:(CPLocale)aLocale
376 {
377  var array = [CPArray array],
378  dict = [localizedName valueForKey:[aLocale objectForKey:CPLocaleLanguageCode]],
379  keys = [dict keyEnumerator],
380  key;
381 
382  while (key = [keys nextObject])
383  [array addObject:[[dict valueForKey:key] objectAtIndex:style]];
384 
385  return array;
386 }
387 
388 #pragma mark -
389 #pragma mark Class accessors
390 
394 {
395  // TODO : don't know what to do ^^
396  return timeZoneDataVersion;
397 }
398 
402 {
403  return localTimeZone;
404 }
405 
409 {
410  return defaultTimeZone;
411 }
412 
416 + (void)setDefaultTimeZone:(CPTimeZone)aTimeZone
417 {
418  defaultTimeZone = aTimeZone;
419 }
420 
425 {
426  var date = [CPDate date],
427  abbreviation = String(String(date).split("(")[1]).split(")")[0];
428 
429  systemTimeZone = [self timeZoneWithAbbreviation:abbreviation];
430 
431  [[CPNotification defaultCenter] postNotificationName:CPSystemTimeZoneDidChangeNotification object:systemTimeZone];
432 }
433 
437 {
438  return systemTimeZone;
439 }
440 
444 {
445  return abbreviationDictionary;
446 }
447 
451 + (void)setAbbreviationDictionary:(CPDictionary)dict
452 {
453  abbreviationDictionary = dict;
454 }
455 
459 {
460  return knownTimeZoneNames;
461 }
462 
463 
464 #pragma mark -
465 #pragma mark Consructors
466 
474 - (id)_initWithName:(CPString)tzName abbreviation:(CPString)abbreviation
475 {
476  if (!tzName)
477  [CPException raise:CPInvalidArgumentException reason:"Invalid value provided for tzName"];
478 
479  if (![knownTimeZoneNames containsObject:tzName] || !abbreviation)
480  return nil;
481 
482  if (self = [super init])
483  {
484  _name = tzName;
485  _abbreviation = abbreviation;
486  }
487 
488  return self;
489 }
490 
497 - (id)initWithName:(CPString)tzName
498 {
499  if (!tzName)
500  [CPException raise:CPInvalidArgumentException reason:"Invalid value provided for tzName"];
501 
502  if (![knownTimeZoneNames containsObject:tzName])
503  return nil;
504 
505  if (self = [super init])
506  {
507  _name = tzName;
508 
510  key;
511 
512  while (key = [keys nextObject])
513  {
514  var value = [abbreviationDictionary valueForKey:key];
515 
516  if ([value isEqualToString:_name])
517  {
518  _abbreviation = key;
519  break;
520  }
521  }
522  }
523 
524  return self;
525 }
526 
534 - (id)initWithName:(CPString)tzName data:(CPData)data
535 {
536  if (self = [self initWithName:tzName])
537  {
538  _data = data;
539  }
540 
541  return self;
542 }
543 
544 
545 #pragma mark -
546 #pragma mark Methods for CPDate
547 
552 - (CPString)abbreviationForDate:(CPDate)date
553 {
554  if (!date)
555  return nil;
556 
557  return String(String(date).split("(")[1]).split(")")[0];
558 }
559 
565 - (CPInteger)secondsFromGMTForDate:(CPDate)date
566 {
567  if (!date)
568  return nil;
569 
570  var abbreviation = String(String(date).split("(")[1]).split(")")[0];
571 
572  return [timeDifferenceFromUTC valueForKey:abbreviation] * 60;
573 }
574 
578 - (CPInteger)secondsFromGMT
579 {
580  return [timeDifferenceFromUTC valueForKey:_abbreviation] * 60;
581 }
582 
583 
584 #pragma mark -
585 #pragma mark Compars methods
586 
591 - (BOOL)isEqualToTimeZone:(CPTimeZone)aTimeZone
592 {
593  return [[aTimeZone name] isEqualToString:_name] && [aTimeZone data] == _data
594 }
595 
596 
597 #pragma mark -
598 #pragma mark Description
599 
605 {
606  return [CPString stringWithFormat:@"%s (%s) offset %i", _name, _abbreviation, [self secondsFromGMT]];
607 }
608 
609 
610 #pragma mark -
611 #pragma mark Localized methods
612 
618 - (CPString)localizedName:(NSTimeZoneNameStyle)style locale:(CPLocale)locale
619 {
620  if (style > 5)
621  return nil;
622 
623  return [[[localizedName valueForKey:[locale objectForKey:CPLocaleLanguageCode]] valueForKey:_abbreviation] objectAtIndex:style];
624 }
625 
626 @end
627 
629 
633 - (CPData)data
634 {
635  return _data;
636 }
637 
641 - (CPInteger)secondFromGMT
642 {
643  return _secondsFromGMT;
644 }
645 
649 - (CPString)abbreviation
650 {
651  return _abbreviation;
652 }
653 
658 {
659  return _name;
660 }
661 
662 @end
Used to implement exception handling (creating & raising).
Definition: CPException.h:2
CPTimeZone localTimeZone()
Definition: CPTimeZone.j:401
CPTimeZoneNameStyleShortGeneric
Definition: CPTimeZone.j:29
A representation of a single point in time.
Definition: CPDate.h:2
CPData data()
Definition: CPTimeZone.j:633
id initWithName:data:(CPString tzName, [data] CPData data)
Definition: CPTimeZone.j:534
id timeZoneWithAbbreviation:(CPString abbreviation)
Definition: CPTimeZone.j:291
CPString timeZoneDataVersion()
Definition: CPTimeZone.j:393
var systemTimeZone
Definition: CPTimeZone.j:33
CPEnumerator keyEnumerator()
Definition: CPDictionary.j:429
var localizedName
Definition: CPTimeZone.j:33
CPDictionary abbreviationDictionary()
Definition: CPTimeZone.j:443
var abbreviationDictionary
Definition: CPTimeZone.j:33
A Cappuccino wrapper for any data type.
Definition: CPData.h:2
void raise:reason:(CPString aName, [reason] CPString aReason)
Definition: CPException.j:66
var timeZoneDataVersion
Definition: CPTimeZone.j:33
CPArray knownTimeZoneNames()
Definition: CPTimeZone.j:458
var timeDifferenceFromUTC
Definition: CPTimeZone.j:33
A mutable key-value pair collection.
Definition: CPDictionary.h:2
CPInteger secondsFromGMT()
Definition: CPTimeZone.j:578
CPTimeZoneNameStyleShortStandard
Definition: CPTimeZone.j:25
CPTimeZoneNameStyleGeneric
Definition: CPTimeZone.j:28
An immutable string (collection of characters).
Definition: CPString.h:2
CPTimeZone systemTimeZone()
Definition: CPTimeZone.j:436
CPTimeZoneNameStyleStandard
Definition: CPTimeZone.j:24
id objectForKey:(id aKey)
Definition: CPLocale.j:203
CPTimeZone is a class to define the behvior of time zone object (like CPDatePicker) ...
Definition: CPTimeZone.h:2
BOOL isEqualToString:(CPString aString)
Definition: CPString.j:584
A notification that can be posted to a CPNotificationCenter.
Definition: CPNotification.h:2
var localTimeZone
Definition: CPTimeZone.j:33
CPTimeZoneNameStyleDaylightSaving
Definition: CPTimeZone.j:26
id valueForKey:(CPString aKey)
CPString name()
Definition: CPTimeZone.j:657
void resetSystemTimeZone()
Definition: CPTimeZone.j:424
id init()
Definition: CPObject.j:145
var defaultTimeZone
Definition: CPTimeZone.j:33
CPString description()
Definition: CPTimeZone.j:604
id date()
Definition: CPDate.j:42
CPSystemTimeZoneDidChangeNotification
Definition: CPTimeZone.j:31
void initialize()
Definition: CPTimeZone.j:56
CPTimeZone defaultTimeZone()
Definition: CPTimeZone.j:408
var knownTimeZoneNames
Definition: CPTimeZone.j:33
id alloc()
Definition: CPObject.j:130
CPTimeZoneNameStyleShortDaylightSaving
Definition: CPTimeZone.j:27
id stringWithFormat:(CPString format, [,] ...)
Definition: CPString.j:166