Uses of Class
com.ibm.icu.util.Calendar
-
Packages that use Calendar Package Description com.ibm.icu.dev.demo.calendar Calendar demo applications including date/time arithmetic.com.ibm.icu.dev.demo.holiday Holiday demo application.com.ibm.icu.impl com.ibm.icu.impl.jdkadapter com.ibm.icu.text Extensions and enhancements to java.text to support unicode transforms, UnicodeSet, surrogate char utilities, UCA collation, normalization, break iteration (rule and dictionary based), enhanced number format, international string searching, and arabic shaping.com.ibm.icu.util International calendars and other utility classes. -
-
Uses of Calendar in com.ibm.icu.dev.demo.calendar
Fields in com.ibm.icu.dev.demo.calendar declared as Calendar Modifier and Type Field Description (package private) Calendar
CalendarCalcFrame.CalendarRec. calendar
(package private) Calendar
CalendarFrame.CalendarRec. calendar
private Calendar[]
CalendarFrame. calendars
private Calendar[]
CalendarPanel. fCalendar
Methods in com.ibm.icu.dev.demo.calendar that return Calendar Modifier and Type Method Description Calendar
CalendarPanel. getCalendar(int index)
private static Calendar
CalendarCalcFrame. makeIslamic(boolean civil)
private static Calendar
CalendarFrame. makeIslamic(boolean civil)
Methods in com.ibm.icu.dev.demo.calendar with parameters of type Calendar Modifier and Type Method Description void
CalendarPanel. setCalendar(int index, Calendar c)
Constructors in com.ibm.icu.dev.demo.calendar with parameters of type Calendar Constructor Description CalendarRec(java.lang.String nameStr, Calendar cal)
CalendarRec(java.lang.String nameStr, Calendar cal)
-
Uses of Calendar in com.ibm.icu.dev.demo.holiday
Fields in com.ibm.icu.dev.demo.holiday declared as Calendar Modifier and Type Field Description private Calendar
HolidayCalendarDemo.CalendarPanel. fCalendar
Methods in com.ibm.icu.dev.demo.holiday that return Calendar Modifier and Type Method Description Calendar
HolidayCalendarDemo.CalendarPanel. getCalendar()
-
Uses of Calendar in com.ibm.icu.impl
Methods in com.ibm.icu.impl that return Calendar Modifier and Type Method Description private Calendar
RelativeDateFormat. initializeCalendar(TimeZone zone, ULocale locale)
initializes fCalendar from parameters.private static Calendar
JavaTimeConverters. millisToCalendar(long epochMillis)
Deprecated.private static Calendar
JavaTimeConverters. millisToCalendar(long epochMillis, TimeZone timeZone)
Deprecated.(package private) static Calendar
JavaTimeConverters. temporalToCalendar(java.time.chrono.ChronoLocalDate date)
Deprecated.static Calendar
JavaTimeConverters. temporalToCalendar(java.time.LocalDateTime dateTime)
Deprecated.This API is ICU internal only.static Calendar
JavaTimeConverters. temporalToCalendar(java.time.LocalTime time)
Deprecated.This API is ICU internal only.static Calendar
JavaTimeConverters. temporalToCalendar(java.time.OffsetDateTime dateTime)
Deprecated.This API is ICU internal only.static Calendar
JavaTimeConverters. temporalToCalendar(java.time.OffsetTime time)
Deprecated.This API is ICU internal only.static Calendar
JavaTimeConverters. temporalToCalendar(java.time.temporal.Temporal temp)
Deprecated.This API is ICU internal only.static Calendar
JavaTimeConverters. temporalToCalendar(java.time.ZonedDateTime dateTime)
Deprecated.This API is ICU internal only.Methods in com.ibm.icu.impl with parameters of type Calendar Modifier and Type Method Description private static int
RelativeDateFormat. dayDifference(Calendar until)
java.lang.StringBuffer
RelativeDateFormat. format(Calendar cal, java.lang.StringBuffer toAppendTo, java.text.FieldPosition fieldPosition)
private MessageFormat
RelativeDateFormat. initializeCombinedFormat(Calendar cal, ULocale locale)
void
RelativeDateFormat. parse(java.lang.String text, Calendar cal, java.text.ParsePosition pos)
Constructors in com.ibm.icu.impl with parameters of type Calendar Constructor Description RelativeDateFormat(int timeStyle, int dateStyle, ULocale locale, Calendar cal)
-
Uses of Calendar in com.ibm.icu.impl.jdkadapter
Fields in com.ibm.icu.impl.jdkadapter declared as Calendar Modifier and Type Field Description private Calendar
CalendarICU. fIcuCal
Methods in com.ibm.icu.impl.jdkadapter that return Calendar Modifier and Type Method Description Calendar
CalendarICU. unwrap()
Methods in com.ibm.icu.impl.jdkadapter with parameters of type Calendar Modifier and Type Method Description int
CalendarICU. compareTo(Calendar anotherCalendar)
static java.util.Calendar
CalendarICU. wrap(Calendar icuCal)
Constructors in com.ibm.icu.impl.jdkadapter with parameters of type Calendar Constructor Description CalendarICU(Calendar icuCal)
-
Uses of Calendar in com.ibm.icu.text
Fields in com.ibm.icu.text declared as Calendar Modifier and Type Field Description protected Calendar
DateFormat. calendar
The calendar thatDateFormat
uses to produce the time field values needed to implement date and time formatting.private Calendar
DateIntervalFormat. fFromCalendar
private Calendar
DateIntervalFormat. fToCalendar
Methods in com.ibm.icu.text that return Calendar Modifier and Type Method Description Calendar
DateFormat. getCalendar()
Returns the calendar associated with this date/time formatter.Methods in com.ibm.icu.text with parameters of type Calendar Modifier and Type Method Description private boolean
SimpleDateFormat. diffCalFieldValue(Calendar fromCalendar, Calendar toCalendar, java.lang.Object[] items, int i)
check whether the i-th item in 2 calendar is in different value.private java.lang.StringBuffer
DateIntervalFormat. fallbackFormat(Calendar fromCalendar, Calendar toCalendar, boolean fromToOnSameDay, java.lang.StringBuffer appendTo, java.text.FieldPosition pos, DateIntervalFormat.FormatOutput output, java.util.List<java.text.FieldPosition> attributes)
private java.lang.StringBuffer
DateIntervalFormat. fallbackFormat(Calendar fromCalendar, Calendar toCalendar, boolean fromToOnSameDay, java.lang.StringBuffer appendTo, java.text.FieldPosition pos, DateIntervalFormat.FormatOutput output, java.util.List<java.text.FieldPosition> attributes, java.lang.String fullPattern)
private void
DateIntervalFormat. fallbackFormatRange(Calendar fromCalendar, Calendar toCalendar, java.lang.StringBuffer appendTo, java.lang.StringBuilder patternSB, java.text.FieldPosition pos, DateIntervalFormat.FormatOutput output, java.util.List<java.text.FieldPosition> attributes)
Like fallbackFormat, but specifically for ranges.abstract java.lang.StringBuffer
DateFormat. format(Calendar cal, java.lang.StringBuffer toAppendTo, java.text.FieldPosition fieldPosition)
Formats a date into a date/time string.java.lang.StringBuffer
DateIntervalFormat. format(Calendar fromCalendar, Calendar toCalendar, java.lang.StringBuffer appendTo, java.text.FieldPosition pos)
Format 2 Calendars to produce a string.private java.lang.StringBuffer
SimpleDateFormat. format(Calendar cal, DisplayContext capitalizationContext, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos, java.util.List<java.text.FieldPosition> attributes)
java.lang.StringBuffer
SimpleDateFormat. format(Calendar cal, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
Formats a date or time, which is the standard millis since January 1, 1970, 00:00:00 GMT.(package private) java.lang.StringBuffer
SimpleDateFormat. format(Calendar cal, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos, java.util.List<java.text.FieldPosition> attributes)
Internal formatting method that accepts an attributes list.private java.lang.StringBuffer
DateIntervalFormat. formatImpl(Calendar fromCalendar, Calendar toCalendar, java.lang.StringBuffer appendTo, java.text.FieldPosition pos, DateIntervalFormat.FormatOutput output, java.util.List<java.text.FieldPosition> attributes)
DateIntervalFormat.FormattedDateInterval
DateIntervalFormat. formatToValue(Calendar fromCalendar, Calendar toCalendar)
Format 2 Calendars to produce a FormattedDateInterval.private static DateFormat
DateFormat. get(int dateStyle, int timeStyle, ULocale loc, Calendar cal)
Creates a DateFormat with the given time and/or date style in the given locale.static java.util.ResourceBundle
DateFormatSymbols. getDateFormatBundle(Calendar cal, ULocale locale)
Deprecated.ICU 4.0static java.util.ResourceBundle
DateFormatSymbols. getDateFormatBundle(Calendar cal, java.util.Locale locale)
Deprecated.ICU 4.0static DateFormat
DateFormat. getDateInstance(Calendar cal, int dateStyle)
Creates aDateFormat
object for the default locale that can be used to format dates in the calendar system specified bycal
.static DateFormat
DateFormat. getDateInstance(Calendar cal, int dateStyle, ULocale locale)
Creates aDateFormat
object that can be used to format dates in the calendar system specified bycal
.static DateFormat
DateFormat. getDateInstance(Calendar cal, int dateStyle, java.util.Locale locale)
Creates aDateFormat
object that can be used to format dates in the calendar system specified bycal
.static DateFormat
DateFormat. getDateTimeInstance(Calendar cal, int dateStyle, int timeStyle)
Creates aDateFormat
object for the default locale that can be used to format dates and times in the calendar system specified bycal
.static DateFormat
DateFormat. getDateTimeInstance(Calendar cal, int dateStyle, int timeStyle, ULocale locale)
Creates aDateFormat
object that can be used to format dates and times in the calendar system specified bycal
.static DateFormat
DateFormat. getDateTimeInstance(Calendar cal, int dateStyle, int timeStyle, java.util.Locale locale)
Creates aDateFormat
object that can be used to format dates and times in the calendar system specified bycal
.static DateFormat
DateFormat. getInstance(Calendar cal)
Returns a default date/time formatter that uses the SHORT style for both the date and the time.static DateFormat
DateFormat. getInstance(Calendar cal, ULocale locale)
Returns a date/time formatter that uses the SHORT style for both the date and the time.static DateFormat
DateFormat. getInstance(Calendar cal, java.util.Locale locale)
Returns a date/time formatter that uses the SHORT style for both the date and the time.static DateFormat
DateFormat. getInstanceForSkeleton(Calendar cal, java.lang.String skeleton, ULocale locale)
Creates aDateFormat
object that can be used to format dates and times in the calendar system specified bycal
.static DateFormat
DateFormat. getInstanceForSkeleton(Calendar cal, java.lang.String skeleton, java.util.Locale locale)
Creates aDateFormat
object that can be used to format dates and times in the calendar system specified bycal
.static DateFormat
DateFormat. getPatternInstance(Calendar cal, java.lang.String skeleton, ULocale locale)
Creates aDateFormat
object that can be used to format dates and times in the calendar system specified bycal
.static DateFormat
DateFormat. getPatternInstance(Calendar cal, java.lang.String skeleton, java.util.Locale locale)
Creates aDateFormat
object that can be used to format dates and times in the calendar system specified bycal
.java.lang.String
DateIntervalFormat. getPatterns(Calendar fromCalendar, Calendar toCalendar, Output<java.lang.String> part2)
Deprecated.This API is ICU internal only.static DateFormat
DateFormat. getTimeInstance(Calendar cal, int timeStyle)
Creates aDateFormat
object that can be used to format times in the calendar system specified bycal
.static DateFormat
DateFormat. getTimeInstance(Calendar cal, int timeStyle, ULocale locale)
Creates aDateFormat
object that can be used to format times in the calendar system specified bycal
.static DateFormat
DateFormat. getTimeInstance(Calendar cal, int timeStyle, java.util.Locale locale)
Creates aDateFormat
object that can be used to format times in the calendar system specified bycal
.java.lang.StringBuffer
SimpleDateFormat. intervalFormatByAlgorithm(Calendar fromCalendar, Calendar toCalendar, java.lang.StringBuffer appendTo, java.text.FieldPosition pos)
Deprecated.This API is ICU internal only.private int
SimpleDateFormat. matchAlphaMonthStrings(java.lang.String text, int start, java.lang.String[] wideData, java.lang.String[] shortData, Calendar cal)
Deprecated.This API is ICU internal only.protected int
SimpleDateFormat. matchQuarterString(java.lang.String text, int start, int field, java.lang.String[] data, Calendar cal)
Attempt to match the text at a given position against an array of quarter strings.protected int
SimpleDateFormat. matchString(java.lang.String text, int start, int field, java.lang.String[] data, Calendar cal)
Attempt to match the text at a given position against an array of strings.private int
SimpleDateFormat. matchString(java.lang.String text, int start, int field, java.lang.String[] data, java.lang.String monthPattern, Calendar cal)
Deprecated.This API is ICU internal only.abstract void
DateFormat. parse(java.lang.String text, Calendar cal, java.text.ParsePosition pos)
Parses a date/time string according to the given parse position.void
SimpleDateFormat. parse(java.lang.String text, Calendar cal, java.text.ParsePosition parsePos)
Overrides DateFormatvoid
DateFormat. setCalendar(Calendar newCalendar)
Sets the calendar to be used by this date format.protected void
ChineseDateFormat. subFormat(java.lang.StringBuffer buf, char ch, int count, int beginOffset, int fieldNum, DisplayContext capitalizationContext, java.text.FieldPosition pos, char patternCharToOutput, Calendar cal)
Deprecated.This API is ICU internal only.protected java.lang.String
SimpleDateFormat. subFormat(char ch, int count, int beginOffset, int fieldNum, DisplayContext capitalizationContext, java.text.FieldPosition pos, char patternCharToOutput, Calendar cal)
Deprecated.This API is ICU internal only.protected java.lang.String
SimpleDateFormat. subFormat(char ch, int count, int beginOffset, java.text.FieldPosition pos, DateFormatSymbols fmtData, Calendar cal)
Formats a single field, given its pattern character.protected void
SimpleDateFormat. subFormat(java.lang.StringBuffer buf, char ch, int count, int beginOffset, int fieldNum, DisplayContext capitalizationContext, java.text.FieldPosition pos, char patternCharToOutput, Calendar cal)
Deprecated.This API is ICU internal only.protected int
ChineseDateFormat. subParse(java.lang.String text, int start, char ch, int count, boolean obeyCount, boolean allowNegative, boolean[] ambiguousYear, Calendar cal)
Deprecated.ICU 50protected int
SimpleDateFormat. subParse(java.lang.String text, int start, char ch, int count, boolean obeyCount, boolean allowNegative, boolean[] ambiguousYear, Calendar cal)
Protected method that converts one field of the input string into a numeric field value incal
.private int
SimpleDateFormat. subParse(java.lang.String text, int start, char ch, int count, boolean obeyCount, boolean allowNegative, boolean[] ambiguousYear, Calendar cal, MessageFormat numericLeapMonthFormatter, Output<TimeZoneFormat.TimeType> tzTimeType)
Overloading to provide default argument (null) for day period.private int
SimpleDateFormat. subParse(java.lang.String text, int start, char ch, int count, boolean obeyCount, boolean allowNegative, boolean[] ambiguousYear, Calendar cal, MessageFormat numericLeapMonthFormatter, Output<TimeZoneFormat.TimeType> tzTimeType, Output<DayPeriodRules.DayPeriod> dayPeriod)
Deprecated.This API is ICU internal only.Method parameters in com.ibm.icu.text with type arguments of type Calendar Modifier and Type Method Description static java.util.ResourceBundle
DateFormatSymbols. getDateFormatBundle(java.lang.Class<? extends Calendar> calendarClass, ULocale locale)
Deprecated.ICU 4.0static java.util.ResourceBundle
DateFormatSymbols. getDateFormatBundle(java.lang.Class<? extends Calendar> calendarClass, java.util.Locale locale)
Deprecated.ICU 4.0Constructors in com.ibm.icu.text with parameters of type Calendar Constructor Description ChineseDateFormatSymbols(Calendar cal, ULocale locale)
Deprecated.ICU 50ChineseDateFormatSymbols(Calendar cal, java.util.Locale locale)
Deprecated.ICU 50DateFormatSymbols(Calendar cal, ULocale locale)
Returns theDateFormatSymbols
object that should be used to format a calendar system's dates in the given locale.DateFormatSymbols(Calendar cal, java.util.Locale locale)
Returns theDateFormatSymbols
object that should be used to format a calendar system's dates in the given locale.SimpleDateFormat(java.lang.String pattern, DateFormatSymbols formatData, Calendar calendar, NumberFormat numberFormat, ULocale locale, boolean useFastFormat, java.lang.String override)
SimpleDateFormat(java.lang.String pattern, DateFormatSymbols formatData, Calendar calendar, ULocale locale, boolean useFastFormat, java.lang.String override)
Package-private constructor that allows a subclass to specify whether it supports fast formatting.Constructor parameters in com.ibm.icu.text with type arguments of type Calendar Constructor Description DateFormatSymbols(java.lang.Class<? extends Calendar> calendarClass, ULocale locale)
Variant of DateFormatSymbols(Calendar, ULocale) that takes the Calendar class instead of a Calendar instance.DateFormatSymbols(java.lang.Class<? extends Calendar> calendarClass, java.util.Locale locale)
Variant of DateFormatSymbols(Calendar, Locale) that takes the Calendar class instead of a Calendar instance. -
Uses of Calendar in com.ibm.icu.util
Subclasses of Calendar in com.ibm.icu.util Modifier and Type Class Description class
BuddhistCalendar
BuddhistCalendar
is a subclass ofGregorianCalendar
that numbers years since the birth of the Buddha.(package private) class
CECalendar
Base class for EthiopicCalendar and CopticCalendar.class
ChineseCalendar
ChineseCalendar
is a concrete subclass ofCalendar
that implements a traditional Chinese calendar.class
CopticCalendar
Implement the Coptic calendar system.class
DangiCalendar
Deprecated.This API is ICU internal only.class
EthiopicCalendar
Implement the Ethiopic calendar system.class
GregorianCalendar
.class
HebrewCalendar
HebrewCalendar
is a subclass ofCalendar
that that implements the traditional Hebrew calendar.class
IndianCalendar
IndianCalendar
is a subclass ofGregorianCalendar
that numbers years since the birth of the Buddha.class
IslamicCalendar
IslamicCalendar
is a subclass ofCalendar
that that implements the Islamic civil and religious calendars.class
JapaneseCalendar
JapaneseCalendar
is a subclass ofGregorianCalendar
that numbers years and eras based on the reigns of the Japanese emperors.class
PersianCalendar
Deprecated.This API is ICU internal only.class
TaiwanCalendar
TaiwanCalendar
is a subclass ofGregorianCalendar
that numbers years since 1912.Fields in com.ibm.icu.util declared as Calendar Modifier and Type Field Description private Calendar
Calendar.FormatConfiguration. cal
Deprecated.private Calendar
GlobalizationPreferences. calendar
private Calendar
SimpleDateRule. calendar
Methods in com.ibm.icu.util that return Calendar Modifier and Type Method Description private static Calendar
Calendar. createInstance(ULocale locale)
Calendar
Calendar.FormatConfiguration. getCalendar()
Deprecated.This API is ICU internal only.Calendar
GlobalizationPreferences. getCalendar()
Get a copy of the calendar according to the settings.static Calendar
Calendar. getInstance()
Returns a calendar using the default time zone and locale.static Calendar
Calendar. getInstance(TimeZone zone)
Returns a calendar using the specified time zone and default locale.static Calendar
Calendar. getInstance(TimeZone zone, ULocale locale)
Returns a calendar with the specified time zone and locale.static Calendar
Calendar. getInstance(TimeZone zone, java.util.Locale aLocale)
Returns a calendar with the specified time zone and locale.static Calendar
Calendar. getInstance(ULocale locale)
Returns a calendar using the default time zone and specified locale.static Calendar
Calendar. getInstance(java.util.Locale aLocale)
Returns a calendar using the default time zone and specified locale.private static Calendar
Calendar. getInstanceInternal(TimeZone tz, ULocale locale)
protected Calendar
GlobalizationPreferences. guessCalendar()
This function can be overridden by subclasses to use different heuristics.Calendar
Calendar. setWeekData(Calendar.WeekData wdata)
Set data in this calendar based on the WeekData input.Methods in com.ibm.icu.util with parameters of type Calendar Modifier and Type Method Description int
Calendar. compareTo(Calendar that)
Compares the times (in millis) represented by twoCalendar
objects.private java.util.Date
SimpleDateRule. computeInYear(int year, Calendar c)
private static DateFormat
Calendar. formatHelper(Calendar cal, ULocale loc, int dateStyle, int timeStyle)
static java.lang.String
Calendar. getDateAtTimePattern(Calendar cal, ULocale uLocale, int dateStyle)
Deprecated.This API is ICU internal only.static java.lang.String
Calendar. getDateTimePattern(Calendar cal, ULocale uLocale, int dateStyle)
Deprecated.This API is ICU internal only.boolean
Calendar. isEquivalentTo(Calendar other)
Returns true if the given Calendar object is equivalent to this one.boolean
GregorianCalendar. isEquivalentTo(Calendar other)
Returns true if the given Calendar object is equivalent to this one.private static Calendar.PatternData
Calendar.PatternData. make(Calendar cal, ULocale loc)
GlobalizationPreferences
GlobalizationPreferences. setCalendar(Calendar calendar)
Sets the calendar.Constructors in com.ibm.icu.util with parameters of type Calendar Constructor Description SimpleDateRule(int month, int dayOfMonth, Calendar cal)
-