]>
git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/zonemeta.h
2 *******************************************************************************
3 * Copyright (C) 2007-2010, International Business Machines Corporation and *
4 * others. All Rights Reserved. *
5 *******************************************************************************
10 #include "unicode/utypes.h"
12 #if !UCONFIG_NO_FORMATTING
14 #include "unicode/unistr.h"
19 typedef struct OlsonToMetaMappingEntry
{
20 const UChar
*mzid
; // const because it's a reference to a resource bundle string.
23 } OlsonToMetaMappingEntry
;
27 class U_I18N_API ZoneMeta
{
30 * Return the canonical id for this system tzid, which might be the id itself.
31 * If the given system tzid is not know, U_ILLEGAL_ARGUMENT_ERROR is set in the status.
33 static UnicodeString
& U_EXPORT2
getCanonicalSystemID(const UnicodeString
&tzid
, UnicodeString
&systemID
, UErrorCode
& status
);
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.
39 static UnicodeString
& U_EXPORT2
getCanonicalCountry(const UnicodeString
&tzid
, UnicodeString
&canonicalCountry
);
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 the locale data
44 * to see that there is a localization for the country in order to implement
45 * tr#35 appendix J step 5.)
47 static UnicodeString
& U_EXPORT2
getSingleCountry(const UnicodeString
&tzid
, UnicodeString
&country
);
50 * Returns a CLDR metazone ID for the given Olson tzid and time.
52 static UnicodeString
& U_EXPORT2
getMetazoneID(const UnicodeString
&tzid
, UDate date
, UnicodeString
&result
);
54 * Returns an Olson ID for the ginve metazone and region
56 static UnicodeString
& U_EXPORT2
getZoneIdByMetazone(const UnicodeString
&mzid
, const UnicodeString
®ion
, UnicodeString
&result
);
58 static const UVector
* U_EXPORT2
getMetazoneMappings(const UnicodeString
&tzid
);
61 ZoneMeta(); // Prevent construction.
62 static UVector
* createMetazoneMappings(const UnicodeString
&tzid
);
67 #endif /* #if !UCONFIG_NO_FORMATTING */