dtfmtsym.h revision 103e9ffba2cba345d0078eb8b8db33249f81840a
1b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/* 2b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru******************************************************************************** 3103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius* Copyright (C) 1997-2012, International Business Machines 4b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* Corporation and others. All Rights Reserved. 5b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru******************************************************************************** 6b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* 7b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* File DTFMTSYM.H 8b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* 9b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* Modification History: 10b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* 11b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* Date Name Description 12b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* 02/19/97 aliu Converted from java. 13b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* 07/21/98 stephen Added getZoneIndex() 14b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* Changed to match C++ conventions 15b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru******************************************************************************** 16b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru*/ 17b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 18b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#ifndef DTFMTSYM_H 19b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define DTFMTSYM_H 20b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 21b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#include "unicode/utypes.h" 22b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 23b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#if !UCONFIG_NO_FORMATTING 24b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 25b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#include "unicode/calendar.h" 26b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#include "unicode/uobject.h" 27b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#include "unicode/locid.h" 28b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#include "unicode/ures.h" 29b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 30b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 31b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * \file 32b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * \brief C++ API: Symbols for formatting dates. 33b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 34b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 35b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruU_NAMESPACE_BEGIN 36b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 37b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/* forward declaration */ 38b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruclass SimpleDateFormat; 39b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruclass Hashtable; 40b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 41b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 42b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * DateFormatSymbols is a public class for encapsulating localizable date-time 43b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * formatting data -- including timezone data. DateFormatSymbols is used by 44b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * DateFormat and SimpleDateFormat. 45b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * <P> 46b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Rather than first creating a DateFormatSymbols to get a date-time formatter 47b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * by using a SimpleDateFormat constructor, clients are encouraged to create a 48b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * date-time formatter using the getTimeInstance(), getDateInstance(), or 49b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * getDateTimeInstance() method in DateFormat. Each of these methods can return a 50b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * date/time formatter initialized with a default format pattern along with the 51b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * date-time formatting data for a given or default locale. After a formatter is 52b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * created, clients may modify the format pattern using the setPattern function 53b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * as so desired. For more information on using these formatter factory 54b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * functions, see DateFormat. 55b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * <P> 56b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * If clients decide to create a date-time formatter with a particular format 57b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * pattern and locale, they can do so with new SimpleDateFormat(aPattern, 58b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * new DateFormatSymbols(aLocale)). This will load the appropriate date-time 59b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * formatting data from the locale. 60b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * <P> 61b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * DateFormatSymbols objects are clonable. When clients obtain a 62b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * DateFormatSymbols object, they can feel free to modify the date-time 63b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * formatting data as necessary. For instance, clients can 64b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * replace the localized date-time format pattern characters with the ones that 65b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * they feel easy to remember. Or they can change the representative cities 66b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * originally picked by default to using their favorite ones. 67b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * <P> 68b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * DateFormatSymbols are not expected to be subclassed. Data for a calendar is 69b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * loaded out of resource bundles. The 'type' parameter indicates the type of 70b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * calendar, for example, "gregorian" or "japanese". If the type is not gregorian 71b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * (or NULL, or an empty string) then the type is appended to the resource name, 72b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * for example, 'Eras_japanese' instead of 'Eras'. If the resource 'Eras_japanese' did 73b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * not exist (even in root), then this class will fall back to just 'Eras', that is, 74b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Gregorian data. Therefore, the calendar implementor MUST ensure that the root 75b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * locale at least contains any resources that are to be particularized for the 76b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * calendar type. 77b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 78b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruclass U_I18N_API DateFormatSymbols : public UObject { 79b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querupublic: 80b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 81b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Construct a DateFormatSymbols object by loading format data from 82b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * resources for the default locale, in the default calendar (Gregorian). 83b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * <P> 84b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * NOTE: This constructor will never fail; if it cannot get resource 85b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * data for the default locale, it will return a last-resort object 86b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * based on hard-coded strings. 87b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 88b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param status Status code. Failure 89b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * results if the resources for the default cannot be 90b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * found or cannot be loaded 91b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 92b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 93b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru DateFormatSymbols(UErrorCode& status); 94b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 95b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 96b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Construct a DateFormatSymbols object by loading format data from 97b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * resources for the given locale, in the default calendar (Gregorian). 98b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 99b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param locale Locale to load format data from. 100b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param status Status code. Failure 101b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * results if the resources for the locale cannot be 102b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * found or cannot be loaded 103b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 104b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 105b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru DateFormatSymbols(const Locale& locale, 106b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UErrorCode& status); 107b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 108103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifndef U_HIDE_INTERNAL_API 109b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 110b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Construct a DateFormatSymbols object by loading format data from 111b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * resources for the default locale, in the default calendar (Gregorian). 112b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * <P> 113b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * NOTE: This constructor will never fail; if it cannot get resource 114b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * data for the default locale, it will return a last-resort object 115b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * based on hard-coded strings. 116b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 117b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param type Type of calendar (as returned by Calendar::getType). 118b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Will be used to access the correct set of strings. 119b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * (NULL or empty string defaults to "gregorian".) 120b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param status Status code. Failure 121b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * results if the resources for the default cannot be 122b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * found or cannot be loaded 123b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @internal 124b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 125b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru DateFormatSymbols(const char *type, UErrorCode& status); 126b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 127b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 128b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Construct a DateFormatSymbols object by loading format data from 129b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * resources for the given locale, in the default calendar (Gregorian). 130b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 131b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param locale Locale to load format data from. 132b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param type Type of calendar (as returned by Calendar::getType). 133b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Will be used to access the correct set of strings. 134b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * (NULL or empty string defaults to "gregorian".) 135b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param status Status code. Failure 136b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * results if the resources for the locale cannot be 137b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * found or cannot be loaded 138b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @internal 139b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 140b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru DateFormatSymbols(const Locale& locale, 141b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const char *type, 142b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UErrorCode& status); 143103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#endif /* U_HIDE_INTERNAL_API */ 144b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 145b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 146b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Copy constructor. 147b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 148b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 149b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru DateFormatSymbols(const DateFormatSymbols&); 150b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 151b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 152b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Assignment operator. 153b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 154b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 155b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru DateFormatSymbols& operator=(const DateFormatSymbols&); 156b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 157b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 158b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Destructor. This is nonvirtual because this class is not designed to be 159b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * subclassed. 160b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 161b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 162b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru virtual ~DateFormatSymbols(); 163b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 164b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 165b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Return true if another object is semantically equal to this one. 166b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 167b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param other the DateFormatSymbols object to be compared with. 168b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return true if other is semantically equal to this. 169b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 170b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 171b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UBool operator==(const DateFormatSymbols& other) const; 172b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 173b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 174b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Return true if another object is semantically unequal to this one. 175b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 176b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param other the DateFormatSymbols object to be compared with. 177b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return true if other is semantically unequal to this. 178b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 179b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 180b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UBool operator!=(const DateFormatSymbols& other) const { return !operator==(other); } 181b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 182b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 183b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * Gets abbreviated era strings. For example: "AD" and "BC". 184b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 185b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 186b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return the era strings. 187b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 188b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 189b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString* getEras(int32_t& count) const; 190b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 191b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 192b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * Sets abbreviated era strings. For example: "AD" and "BC". 193b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param eras Array of era strings (DateFormatSymbols retains ownership.) 194b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 195b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 196b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 197b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void setEras(const UnicodeString* eras, int32_t count); 198b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 199b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 200b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Gets era name strings. For example: "Anno Domini" and "Before Christ". 201b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 202b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 203b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return the era name strings. 204b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.4 205b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 206b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString* getEraNames(int32_t& count) const; 207b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 208b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 209b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Sets era name strings. For example: "Anno Domini" and "Before Christ". 210b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param eraNames Array of era name strings (DateFormatSymbols retains ownership.) 211b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 212b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.6 213b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 214b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void setEraNames(const UnicodeString* eraNames, int32_t count); 215b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 216b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 21750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Gets narrow era strings. For example: "A" and "B". 218b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * 219b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @param count Filled in with length of the array. 220b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @return the narrow era strings. 22150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @stable ICU 4.2 222b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru */ 223b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru const UnicodeString* getNarrowEras(int32_t& count) const; 224b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru 225b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru /** 226b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * Sets narrow era strings. For example: "A" and "B". 227b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @param narrowEras Array of narrow era strings (DateFormatSymbols retains ownership.) 228b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @param count Filled in with length of the array. 22950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @stable ICU 4.2 230b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru */ 231b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru void setNarrowEras(const UnicodeString* narrowEras, int32_t count); 232b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru 233b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru /** 234b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Gets month strings. For example: "January", "February", etc. 235b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 236b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return the month strings. (DateFormatSymbols retains ownership.) 237b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 238b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 239b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString* getMonths(int32_t& count) const; 240b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 241b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 242b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Sets month strings. For example: "January", "February", etc. 243b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 244b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param months the new month strings. (not adopted; caller retains ownership) 245b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 246b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 247b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 248b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void setMonths(const UnicodeString* months, int32_t count); 249b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 250b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 251b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Gets short month strings. For example: "Jan", "Feb", etc. 252b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 253b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 254b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return the short month strings. (DateFormatSymbols retains ownership.) 255b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 256b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 257b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString* getShortMonths(int32_t& count) const; 258b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 259b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 260b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Sets short month strings. For example: "Jan", "Feb", etc. 261b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 262b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param shortMonths the new short month strings. (not adopted; caller retains ownership) 263b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 264b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 265b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void setShortMonths(const UnicodeString* shortMonths, int32_t count); 266b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 267b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 268b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Selector for date formatting context 269b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.6 270b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 271b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru enum DtContextType { 272b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru FORMAT, 273b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru STANDALONE, 274b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru DT_CONTEXT_COUNT 275b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru }; 276b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 277b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 278b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Selector for date formatting width 279b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.6 280b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 281b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru enum DtWidthType { 282b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru ABBREVIATED, 283b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru WIDE, 284b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NARROW, 285b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru DT_WIDTH_COUNT 286b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru }; 287b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 288b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 289b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Gets month strings by width and context. For example: "January", "February", etc. 290b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 291b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param context The formatting context, either FORMAT or STANDALONE 292b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param width The width of returned strings, either WIDE, ABBREVIATED, or NARROW. 293b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return the month strings. (DateFormatSymbols retains ownership.) 294b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.4 295b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 296b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString* getMonths(int32_t& count, DtContextType context, DtWidthType width) const; 297b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 298b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 299b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Sets month strings by width and context. For example: "January", "February", etc. 300b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 301b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param months The new month strings. (not adopted; caller retains ownership) 302b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 303b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param context The formatting context, either FORMAT or STANDALONE 304b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param width The width of returned strings, either WIDE, ABBREVIATED, or NARROW. 305b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.6 306b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 307b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void setMonths(const UnicodeString* months, int32_t count, DtContextType context, DtWidthType width); 308b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 309b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 310b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Gets weekday strings. For example: "Sunday", "Monday", etc. 311b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 312b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return the weekday strings. (DateFormatSymbols retains ownership.) 313b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 314b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 315b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString* getWeekdays(int32_t& count) const; 316b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 317b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 318b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 319b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Sets weekday strings. For example: "Sunday", "Monday", etc. 320b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param weekdays the new weekday strings. (not adopted; caller retains ownership) 321b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 322b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 323b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 324b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void setWeekdays(const UnicodeString* weekdays, int32_t count); 325b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 326b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 327b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Gets short weekday strings. For example: "Sun", "Mon", etc. 328b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 329b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return the short weekday strings. (DateFormatSymbols retains ownership.) 330b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 331b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 332b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString* getShortWeekdays(int32_t& count) const; 333b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 334b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 335b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Sets short weekday strings. For example: "Sun", "Mon", etc. 336b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param shortWeekdays the new short weekday strings. (not adopted; caller retains ownership) 337b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 338b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 339b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 340b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void setShortWeekdays(const UnicodeString* shortWeekdays, int32_t count); 341b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 342b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 343b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Gets weekday strings by width and context. For example: "Sunday", "Monday", etc. 344b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 345b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param context The formatting context, either FORMAT or STANDALONE 346b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param width The width of returned strings, either WIDE, ABBREVIATED, or NARROW 347b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return the month strings. (DateFormatSymbols retains ownership.) 348b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.4 349b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 350b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString* getWeekdays(int32_t& count, DtContextType context, DtWidthType width) const; 351b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 352b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 353b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Sets weekday strings by width and context. For example: "Sunday", "Monday", etc. 354b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param weekdays The new weekday strings. (not adopted; caller retains ownership) 355b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 356b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param context The formatting context, either FORMAT or STANDALONE 357b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param width The width of returned strings, either WIDE, ABBREVIATED, or NARROW 358b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.6 359b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 360b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void setWeekdays(const UnicodeString* weekdays, int32_t count, DtContextType context, DtWidthType width); 361b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 362b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 363b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Gets quarter strings by width and context. For example: "1st Quarter", "2nd Quarter", etc. 364b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 365b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param context The formatting context, either FORMAT or STANDALONE 366b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param width The width of returned strings, either WIDE or ABBREVIATED. There 367b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * are no NARROW quarters. 368b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return the quarter strings. (DateFormatSymbols retains ownership.) 369b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.6 370b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 371b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString* getQuarters(int32_t& count, DtContextType context, DtWidthType width) const; 372b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 373b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 374b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Sets quarter strings by width and context. For example: "1st Quarter", "2nd Quarter", etc. 375b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 376b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param quarters The new quarter strings. (not adopted; caller retains ownership) 377b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 378b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param context The formatting context, either FORMAT or STANDALONE 379b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param width The width of returned strings, either WIDE or ABBREVIATED. There 380b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * are no NARROW quarters. 381b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.6 382b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 383b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void setQuarters(const UnicodeString* quarters, int32_t count, DtContextType context, DtWidthType width); 384b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 385b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 386b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Gets AM/PM strings. For example: "AM" and "PM". 387b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 388b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return the weekday strings. (DateFormatSymbols retains ownership.) 389b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 390b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 391b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString* getAmPmStrings(int32_t& count) const; 392b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 393b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 394b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Sets ampm strings. For example: "AM" and "PM". 395b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param ampms the new ampm strings. (not adopted; caller retains ownership) 396b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count Filled in with length of the array. 397b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 398b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 399b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void setAmPmStrings(const UnicodeString* ampms, int32_t count); 400b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 401103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifndef U_HIDE_INTERNAL_API 402103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /** 403103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Somewhat temporary constants for leap month pattern types, adequate for supporting 404103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * just leap month patterns as needed for Chinese lunar calendar. 405103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Eventually we will add full support for different month pattern types (needed for 406103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * other calendars such as Hindu) at which point this approach will be replaced by a 407103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * more complete approach. 408103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 409103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 410103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius enum EMonthPatternType 411103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius { 412103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kLeapMonthPatternFormatWide, 413103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kLeapMonthPatternFormatAbbrev, 414103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kLeapMonthPatternFormatNarrow, 415103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kLeapMonthPatternStandaloneWide, 416103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kLeapMonthPatternStandaloneAbbrev, 417103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kLeapMonthPatternStandaloneNarrow, 418103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kLeapMonthPatternNumeric, 419103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kMonthPatternsCount 420103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius }; 421103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius 422103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /** 423103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Somewhat temporary function for getting complete set of leap month patterns for all 424103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * contexts & widths, indexed by EMonthPatternType values. Returns NULL if calendar 425103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * does not have leap month patterns. Note, there is currently no setter for this. 426103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Eventually we will add full support for different month pattern types (needed for 427103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * other calendars such as Hindu) at which point this approach will be replaced by a 428103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * more complete approach. 429103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @param count Filled in with length of the array (may be 0). 430103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @return The leap month patterns (DateFormatSymbols retains ownership). 431103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * May be NULL if there are no leap month patterns for this calendar. 432103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 433103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 434103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius const UnicodeString* getLeapMonthPatterns(int32_t& count) const; 435103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius 436103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#endif /* U_HIDE_INTERNAL_API */ 437103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius 438103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifndef U_HIDE_DEPRECATED_API 439b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 440b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Gets timezone strings. These strings are stored in a 2-dimensional array. 441b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param rowCount Output param to receive number of rows. 442b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param columnCount Output param to receive number of columns. 443b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return The timezone strings as a 2-d array. (DateFormatSymbols retains ownership.) 444b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @deprecated ICU 3.6 445b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 446b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString** getZoneStrings(int32_t& rowCount, int32_t& columnCount) const; 447103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#endif /* U_HIDE_DEPRECATED_API */ 448b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 449b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 450b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Sets timezone strings. These strings are stored in a 2-dimensional array. 451b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho * <p><b>Note:</b> SimpleDateFormat no longer use the zone strings stored in 452b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho * a DateFormatSymbols. Therefore, the time zone strings set by this mthod 453b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho * have no effects in an instance of SimpleDateFormat for formatting time 454b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho * zones. 455b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param strings The timezone strings as a 2-d array to be copied. (not adopted; caller retains ownership) 456b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param rowCount The number of rows (count of first index). 457b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param columnCount The number of columns (count of second index). 458b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 459b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 460b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void setZoneStrings(const UnicodeString* const* strings, int32_t rowCount, int32_t columnCount); 461b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 462b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 463b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Get the non-localized date-time pattern characters. 464b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return the non-localized date-time pattern characters 465b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 466b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 467b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru static const UChar * U_EXPORT2 getPatternUChars(void); 468b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 469b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 470b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Gets localized date-time pattern characters. For example: 'u', 't', etc. 471b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * <p> 472b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Note: ICU no longer provides localized date-time pattern characters for a locale 473b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * starting ICU 3.8. This method returns the non-localized date-time pattern 474b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * characters unless user defined localized data is set by setLocalPatternChars. 475b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param result Output param which will receive the localized date-time pattern characters. 476b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return A reference to 'result'. 477b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 478b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 479b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString& getLocalPatternChars(UnicodeString& result) const; 480b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 481b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 482b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Sets localized date-time pattern characters. For example: 'u', 't', etc. 483b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param newLocalPatternChars the new localized date-time 484b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * pattern characters. 485b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.0 486b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 487b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void setLocalPatternChars(const UnicodeString& newLocalPatternChars); 488b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 489b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 490b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Returns the locale for this object. Two flavors are available: 491b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * valid and actual locale. 492b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.8 493b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 494b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; 495b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 496103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifndef U_HIDE_INTERNAL_API 497103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /** 498103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Constants for capitalization context usage types. 499103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 500103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 501103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius enum ECapitalizationContextUsageType 502103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius { 503103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageOther, 504103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageMonthFormat, /* except narrow */ 505103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageMonthStandalone, /* except narrow */ 506103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageMonthNarrow, 507103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageDayFormat, /* except narrow */ 508103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageDayStandalone, /* except narrow */ 509103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageDayNarrow, 510103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageEraWide, 511103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageEraAbbrev, 512103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageEraNarrow, 513103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageZoneLong, 514103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageZoneShort, 515103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageMetazoneLong, 516103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageMetazoneShort, 517103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius kCapContextUsageTypeCount 518103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius }; 519103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#endif /* U_HIDE_INTERNAL_API */ 520103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius 521b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 522b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * ICU "poor man's RTTI", returns a UClassID for the actual class. 523b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 524b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.2 525b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 526b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru virtual UClassID getDynamicClassID() const; 527b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 528b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 529b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * ICU "poor man's RTTI", returns a UClassID for this class. 530b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 531b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 2.2 532b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 533b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru static UClassID U_EXPORT2 getStaticClassID(); 534b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 535b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruprivate: 536b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 537b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru friend class SimpleDateFormat; 538b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru friend class DateFormatSymbolsSingleSetter; // see udat.cpp 539b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 540b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 541b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * Abbreviated era strings. For example: "AD" and "BC". 542b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 543b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fEras; 544b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fErasCount; 545b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 546b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 547b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Era name strings. For example: "Anno Domini" and "Before Christ". 548b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 549b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fEraNames; 550b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fEraNamesCount; 551b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru 552b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru /** 553b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * Narrow era strings. For example: "A" and "B". 554b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru */ 555b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru UnicodeString* fNarrowEras; 556b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru int32_t fNarrowErasCount; 557b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 558b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 559b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Month strings. For example: "January", "February", etc. 560b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 561b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fMonths; 562b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fMonthsCount; 563b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 564b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 565b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Short month strings. For example: "Jan", "Feb", etc. 566b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 567b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fShortMonths; 568b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fShortMonthsCount; 569b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 570b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 571b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Narrow month strings. For example: "J", "F", etc. 572b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 573b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fNarrowMonths; 574b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fNarrowMonthsCount; 575b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 576b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 577b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Standalone Month strings. For example: "January", "February", etc. 578b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 579b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fStandaloneMonths; 580b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fStandaloneMonthsCount; 581b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 582b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 583b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Standalone Short month strings. For example: "Jan", "Feb", etc. 584b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 585b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fStandaloneShortMonths; 586b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fStandaloneShortMonthsCount; 587b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 588b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 589b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Standalone Narrow month strings. For example: "J", "F", etc. 590b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 591b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fStandaloneNarrowMonths; 592b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fStandaloneNarrowMonthsCount; 593b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 594b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 595b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Weekday strings. For example: "Sunday", "Monday", etc. 596b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 597b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fWeekdays; 598b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fWeekdaysCount; 599b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 600b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 601b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Short weekday strings. For example: "Sun", "Mon", etc. 602b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 603b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fShortWeekdays; 604b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fShortWeekdaysCount; 605b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 606b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 607b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Narrow weekday strings. For example: "Sun", "Mon", etc. 608b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 609b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fNarrowWeekdays; 610b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fNarrowWeekdaysCount; 611b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 612b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 613b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Standalone Weekday strings. For example: "Sunday", "Monday", etc. 614b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 615b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fStandaloneWeekdays; 616b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fStandaloneWeekdaysCount; 617b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 618b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 619b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Standalone Short weekday strings. For example: "Sun", "Mon", etc. 620b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 621b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fStandaloneShortWeekdays; 622b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fStandaloneShortWeekdaysCount; 623b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 624b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 625b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Standalone Narrow weekday strings. For example: "Sun", "Mon", etc. 626b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 627b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fStandaloneNarrowWeekdays; 628b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fStandaloneNarrowWeekdaysCount; 629b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 630b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 631b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Ampm strings. For example: "AM" and "PM". 632b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 633b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString* fAmPms; 634b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fAmPmsCount; 635b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 636b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 637b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Quarter strings. For example: "1st quarter", "2nd quarter", etc. 638b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 639b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString *fQuarters; 640b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fQuartersCount; 641b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 642b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 643b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Short quarters. For example: "Q1", "Q2", etc. 644b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 645b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString *fShortQuarters; 646b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fShortQuartersCount; 647b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 648b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 649b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Standalone quarter strings. For example: "1st quarter", "2nd quarter", etc. 650b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 651b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString *fStandaloneQuarters; 652b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fStandaloneQuartersCount; 653b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 654b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 655b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Standalone short quarter strings. For example: "Q1", "Q2", etc. 656b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 657b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString *fStandaloneShortQuarters; 658b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fStandaloneShortQuartersCount; 659b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 660b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 661103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * All leap month patterns, for example "{0}bis". 662103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 663103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius UnicodeString *fLeapMonthPatterns; 664103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius int32_t fLeapMonthPatternsCount; 665103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius 666103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /** 667103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * (Format) Short cyclic year names, for example: "jia-zi", "yi-chou", ... "gui-hai" 668103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 669103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius UnicodeString* fShortYearNames; 670103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius int32_t fShortYearNamesCount; 671103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius 672103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /** 67350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Localized names of time zones in this locale. This is a 67450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * two-dimensional array of strings of size n by m, 67550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * where m is at least 5 and up to 7. Each of the n rows is an 67650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * entry containing the localized names for a single TimeZone. 67750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * 67850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Each such row contains (with i ranging from 0..n-1): 67950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * 68050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * zoneStrings[i][0] - time zone ID 68150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * example: America/Los_Angeles 68250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * zoneStrings[i][1] - long name of zone in standard time 68350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * example: Pacific Standard Time 68450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * zoneStrings[i][2] - short name of zone in standard time 68550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * example: PST 68650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * zoneStrings[i][3] - long name of zone in daylight savings time 68750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * example: Pacific Daylight Time 68850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * zoneStrings[i][4] - short name of zone in daylight savings time 68950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * example: PDT 69050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * zoneStrings[i][5] - location name of zone 69150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * example: United States (Los Angeles) 69250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * zoneStrings[i][6] - long generic name of zone 69350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * example: Pacific Time 69450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * zoneStrings[i][7] - short generic of zone 69550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * example: PT 69650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * 69750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * The zone ID is not localized; it corresponds to the ID 69850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * value associated with a system time zone object. All other entries 69950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * are localized names. If a zone does not implement daylight savings 70050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * time, the daylight savings time names are ignored. 70150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * 70250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Note:CLDR 1.5 introduced metazone and its historical mappings. 70350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * This simple two-dimensional array is no longer sufficient to represent 70450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * localized names and its historic changes. Since ICU 3.8.1, localized 70550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * zone names extracted from ICU locale data is stored in a ZoneStringFormat 70650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * instance. But we still need to support the old way of customizing 70750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * localized zone names, so we keep this field for the purpose. 708b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 709b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString **fZoneStrings; // Zone string array set by setZoneStrings 710b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UnicodeString **fLocaleZoneStrings; // Zone string array created by the locale 711b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fZoneStringsRowCount; 712b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t fZoneStringsColCount; 713b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 714b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru Locale fZSFLocale; // Locale used for getting ZoneStringFormat 715b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 716b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 717103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Localized date-time pattern characters. For example: use 'u' as 'y'. 718b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 719103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius UnicodeString fLocalPatternChars; 720b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 721103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifndef U_HIDE_INTERNAL_API 722b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 723103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Capitalization transforms. For each usage type, the first array element indicates 724103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * whether to titlecase for uiListOrMenu context, the second indicates whether to 725103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * titlecase for stand-alone context. 726b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 727103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius UBool fCapitalization[kCapContextUsageTypeCount][2]; 728103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#endif 729b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 730b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 731b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruprivate: 732b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** valid/actual locale information 733b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * these are always ICU locales, so the length should not be a problem 734b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 735b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru char validLocale[ULOC_FULLNAME_CAPACITY]; 736b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru char actualLocale[ULOC_FULLNAME_CAPACITY]; 737b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 738b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru DateFormatSymbols(); // default constructor not implemented 739b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 740b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 741b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Called by the constructors to actually load data from the resources 742b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 743b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param locale The locale to get symbols for. 744b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param type Calendar Type (as from Calendar::getType()) 745b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param status Input/output parameter, set to success or 746b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * failure code upon return. 747b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param useLastResortData determine if use last resort data 748b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 749b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho void initializeData(const Locale& locale, const char *type, UErrorCode& status, UBool useLastResortData = FALSE); 750b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 751b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 752b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Copy or alias an array in another object, as appropriate. 753b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 754b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param dstArray the copy destination array. 755b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param dstCount fill in with the lenth of 'dstArray'. 756b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param srcArray the source array to be copied. 757b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param srcCount the length of items to be copied from the 'srcArray'. 758b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 759b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru static void assignArray(UnicodeString*& dstArray, 760b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t& dstCount, 761b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString* srcArray, 762b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t srcCount); 763b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 764b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 765b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Return true if the given arrays' contents are equal, or if the arrays are 766b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * identical (pointers are equal). 767b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 768b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param array1 one array to be compared with. 769b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param array2 another array to be compared with. 770b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param count the length of items to be copied. 771b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return true if the given arrays' contents are equal, or if the arrays are 772b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * identical (pointers are equal). 773b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 774b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru static UBool arrayCompare(const UnicodeString* array1, 775b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UnicodeString* array2, 776b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru int32_t count); 777b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 778b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 779b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Create a copy, in fZoneStrings, of the given zone strings array. The 780b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * member variables fZoneStringsRowCount and fZoneStringsColCount should be 781b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * set already by the caller. 782b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 783b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void createZoneStrings(const UnicodeString *const * otherStrings); 784b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 785b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 786b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Delete all the storage owned by this object. 787b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 788b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void dispose(void); 789b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 790b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 791b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Copy all of the other's data to this. 792b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param other the object to be copied. 793b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 794b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void copyData(const DateFormatSymbols& other); 795b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 796b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 797b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Create zone strings array by locale if not yet available 798b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 799b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void initZoneStringsArray(void); 800b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 801b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru /** 802b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Delete just the zone strings. 803b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 804b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru void disposeZoneStrings(void); 805b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 806b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 807b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruU_NAMESPACE_END 808b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 809b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#endif /* #if !UCONFIG_NO_FORMATTING */ 810b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 811b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#endif // _DTFMTSYM 812b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru//eof 813