Package com.ibm.icu.util
Class SimpleHoliday
java.lang.Object
com.ibm.icu.util.Holiday
com.ibm.icu.util.SimpleHoliday
- All Implemented Interfaces:
DateRule
Note: The Holiday framework is a technology preview.
Despite its age, is still draft API, and clients should treat it as such.
A holiday whose date can be represented by a month, day, and optionally day of week
in the Gregorian calendar.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SimpleHoliday
All Saints' Day, November 1ststatic final SimpleHoliday
All Souls' Day, November 1ststatic final SimpleHoliday
Assumption, August 15thstatic final SimpleHoliday
Boxing Day, December 26thstatic final SimpleHoliday
Christmas, December 25thstatic final SimpleHoliday
Christmas Eve, December 24thstatic final SimpleHoliday
Epiphany, January 6thstatic final SimpleHoliday
Immaculate Conception, December 8thstatic final SimpleHoliday
May Day, May 1ststatic final SimpleHoliday
New Year's Day - January 1ststatic final SimpleHoliday
New Year's Eve, December 31ststatic final SimpleHoliday
Saint Stephen's Day, December 26th -
Constructor Summary
ConstructorsConstructorDescriptionSimpleHoliday
(int month, int dayOfMonth, int dayOfWeek, String name) // TODO: remove Construct an object representing a holidaySimpleHoliday
(int month, int dayOfMonth, int dayOfWeek, String name, int startYear) SimpleHoliday
(int month, int dayOfMonth, int dayOfWeek, String name, int startYear, int endYear) SimpleHoliday
(int month, int dayOfMonth, String name) Construct an object representing a holidaySimpleHoliday
(int month, int dayOfMonth, String name, int startYear) Construct an object representing a holidaySimpleHoliday
(int month, int dayOfMonth, String name, int startYear, int endYear) Construct an object representing a holiday -
Method Summary
Methods inherited from class com.ibm.icu.util.Holiday
firstAfter, firstBetween, getDisplayName, getDisplayName, getDisplayName, getHolidays, getHolidays, getHolidays, getRule, isBetween, isOn, setRule
-
Field Details
-
NEW_YEARS_DAY
New Year's Day - January 1st -
EPIPHANY
Epiphany, January 6th -
MAY_DAY
May Day, May 1st -
ASSUMPTION
Assumption, August 15th -
ALL_SAINTS_DAY
All Saints' Day, November 1st -
ALL_SOULS_DAY
All Souls' Day, November 1st -
IMMACULATE_CONCEPTION
Immaculate Conception, December 8th -
CHRISTMAS_EVE
Christmas Eve, December 24th -
CHRISTMAS
Christmas, December 25th -
BOXING_DAY
Boxing Day, December 26th -
ST_STEPHENS_DAY
Saint Stephen's Day, December 26th -
NEW_YEARS_EVE
New Year's Eve, December 31st
-
-
Constructor Details
-
SimpleHoliday
Construct an object representing a holiday- Parameters:
month
- The month in which this holiday occurs (0-based)dayOfMonth
- The date within the month (1-based).name
- The name of this holiday. This string is used as a key to look up the holiday's name a resource bundle. If the name is not found in the resource bundle, getDisplayName will return this string instead.- See Also:
-
SimpleHoliday
Construct an object representing a holiday- Parameters:
month
- The month in which this holiday occurs (0-based)dayOfMonth
- The date within the month (1-based).name
- The name of this holiday. This string is used as a key to look up the holiday's name a resource bundle. If the name is not found in the resource bundle, getDisplayName will return this string instead.- See Also:
-
SimpleHoliday
Construct an object representing a holiday- Parameters:
month
- The month in which this holiday occurs (0-based)dayOfMonth
- The date within the month (1-based).name
- The name of this holiday. This string is used as a key to look up the holiday's name a resource bundle. If the name is not found in the resource bundle, getDisplayName will return this string instead.- See Also:
-
SimpleHoliday
// TODO: remove Construct an object representing a holiday- Parameters:
month
- The month in which this holiday occurs (0-based)dayOfMonth
- A date within the month (1-based). The interpretation of this parameter depends on the value ofdayOfWeek
.dayOfWeek
- The day of the week on which this holiday occurs. The following values are legal:- dayOfWeek == 0 - use dayOfMonth only
- dayOfWeek < 0 - use last -dayOfWeek before or on dayOfMonth
- dayOfWeek > 0 - use first dayOfWeek after or on dayOfMonth
name
- The name of this holiday. This string is used as a key to look up the holiday's name a resource bundle. If the name is not found in the resource bundle, getDisplayName will return this string instead.- See Also:
-
SimpleHoliday
-
SimpleHoliday
public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name, int startYear, int endYear)
-