Package com.ibm.icu.impl
Class CalendarData
- java.lang.Object
-
- com.ibm.icu.impl.CalendarData
-
public class CalendarData extends Object
This class abstracts access to calendar (Calendar and DateFormat) data.
-
-
Constructor Summary
Constructors Constructor Description CalendarData(ICUResourceBundle b, String type)CalendarData(ULocale loc, String type)Construct a CalendarData from the given locale.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ICUResourceBundleget(String key)Load data for calendar.ICUResourceBundleget(String key, String subKey)Load data for calendar.ICUResourceBundleget(String key, String contextKey, String subKey)Load data for calendar.ICUResourceBundleget(String key, String set, String contextKey, String subKey)Load data for calendar.StringgetDateTimePattern()Returns the default date-time pattern such as{1}, {0}.StringgetDateTimePattern(int style)Returns the date-time pattern by style where style is one of the style fields defined in DateFormat.String[]getDateTimePatterns()String[]getEras(String subkey)String[]getOverrides()String[]getStringArray(String key)String[]getStringArray(String key, String subKey)String[]getStringArray(String key, String contextKey, String subKey)ULocalegetULocale()
-
-
-
Constructor Detail
-
CalendarData
public CalendarData(ULocale loc, String type)
Construct a CalendarData from the given locale.- Parameters:
loc- locale to use. The 'calendar' keyword will be ignored.type- calendar type. NULL indicates the gregorian calendar. No default lookup is done.
-
CalendarData
public CalendarData(ICUResourceBundle b, String type)
-
-
Method Detail
-
get
public ICUResourceBundle get(String key)
Load data for calendar. Note, this object owns the resources, do NOT call ures_close()!- Parameters:
key- Resource key to data
-
get
public ICUResourceBundle get(String key, String subKey)
Load data for calendar. Note, this object owns the resources, do NOT call ures_close()! There is an implicit key of 'format' data is located in: "calendar/key/format/subKey" for example, calendar/dayNames/format/abbreviated- Parameters:
key- Resource key to datasubKey- Resource key to data
-
get
public ICUResourceBundle get(String key, String contextKey, String subKey)
Load data for calendar. Note, this object owns the resources, do NOT call ures_close()! data is located in: "calendar/key/contextKey/subKey" for example, calendar/dayNames/stand-alone/narrow- Parameters:
key- Resource key to datacontextKey- Resource key to datasubKey- Resource key to data
-
get
public ICUResourceBundle get(String key, String set, String contextKey, String subKey)
Load data for calendar. Note, this object owns the resources... data is located in: "calendar/key/set/contextKey/subKey" for example, calendar/cyclicNameSets/years/format/abbreviated- Parameters:
key- Resource key to dataset- Resource key to datacontextKey- Resource key to datasubKey- Resource key to data
-
getDateTimePatterns
public String[] getDateTimePatterns()
-
getDateTimePattern
public String getDateTimePattern()
Returns the default date-time pattern such as{1}, {0}. {1} is always the date and {0} is always the time.
-
getDateTimePattern
public String getDateTimePattern(int style)
Returns the date-time pattern by style where style is one of the style fields defined in DateFormat. If date-time patterns by style are not available, it returns whatgetDateTimePattern()would return.- Parameters:
style- the style e.g DateFormat.LONG.- Returns:
- the pattern, e.g {1}, {0}.
-
getOverrides
public String[] getOverrides()
-
getULocale
public ULocale getULocale()
-
-