Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: icu46/source/i18n/zonemeta.h

Issue 5516007: Check in the pristine copy of ICU 4.6... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « icu46/source/i18n/wintzimpl.cpp ('k') | icu46/source/i18n/zonemeta.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 *******************************************************************************
3 * Copyright (C) 2007-2010, International Business Machines Corporation and *
4 * others. All Rights Reserved. *
5 *******************************************************************************
6 */
7 #ifndef ZONEMETA_H
8 #define ZONEMETA_H
9
10 #include "unicode/utypes.h"
11
12 #if !UCONFIG_NO_FORMATTING
13
14 #include "unicode/unistr.h"
15 #include "hash.h"
16
17 U_NAMESPACE_BEGIN
18
19 typedef struct OlsonToMetaMappingEntry {
20 const UChar *mzid; // const because it's a reference to a resource bundle st ring.
21 UDate from;
22 UDate to;
23 } OlsonToMetaMappingEntry;
24
25 class UVector;
26
27 class U_I18N_API ZoneMeta {
28 public:
29 /**
30 * Return the canonical id for this system tzid, which might be the id itsel f.
31 * If the given system tzid is not know, U_ILLEGAL_ARGUMENT_ERROR is set in the status.
32 */
33 static UnicodeString& U_EXPORT2 getCanonicalSystemID(const UnicodeString &tz id, UnicodeString &systemID, UErrorCode& status);
34
35 /**
36 * Return the canonical country code for this tzid. If we have none, or if the time zone
37 * is not associated with a country, return null.
38 */
39 static UnicodeString& U_EXPORT2 getCanonicalCountry(const UnicodeString &tzi d, UnicodeString &canonicalCountry);
40
41 /**
42 * Return the country code if this is a 'single' time zone that can fallback to just
43 * the country, otherwise return empty string. (Note, one must also check t he locale data
44 * to see that there is a localization for the country in order to implement
45 * tr#35 appendix J step 5.)
46 */
47 static UnicodeString& U_EXPORT2 getSingleCountry(const UnicodeString &tzid, UnicodeString &country);
48
49 /**
50 * Returns a CLDR metazone ID for the given Olson tzid and time.
51 */
52 static UnicodeString& U_EXPORT2 getMetazoneID(const UnicodeString &tzid, UDa te date, UnicodeString &result);
53 /**
54 * Returns an Olson ID for the ginve metazone and region
55 */
56 static UnicodeString& U_EXPORT2 getZoneIdByMetazone(const UnicodeString &mzi d, const UnicodeString &region, UnicodeString &result);
57
58 static const UVector* U_EXPORT2 getMetazoneMappings(const UnicodeString &tzi d);
59
60 private:
61 ZoneMeta(); // Prevent construction.
62 static UVector* createMetazoneMappings(const UnicodeString &tzid);
63 };
64
65 U_NAMESPACE_END
66
67 #endif /* #if !UCONFIG_NO_FORMATTING */
68 #endif // ZONEMETA_H
OLDNEW
« no previous file with comments | « icu46/source/i18n/wintzimpl.cpp ('k') | icu46/source/i18n/zonemeta.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698