Class Holiday
java.lang.Object
org.graalvm.shadowed.com.ibm.icu.util.Holiday
- All Implemented Interfaces:
DateRule
- Direct Known Subclasses:
EasterHoliday,HebrewHoliday,SimpleHoliday
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfirstAfter(Date start) Return the first occurrence of this holiday on or after the given datefirstBetween(Date start, Date end) Return the first occurrence of this holiday that is on or after the given start date and before the given end date.Return the name of this holiday in the language of the defaultDISPLAYlocale.getDisplayName(Locale locale) Return the name of this holiday in the language of the specified locale.getDisplayName(ULocale locale) Return the name of this holiday in the language of the specified locale Thenameparameter passed to this object's constructor is used as a key to look up the holiday's localized name in a ResourceBundle object named HolidayBundle.static Holiday[]static Holiday[]getHolidays(Locale locale) static Holiday[]getHolidays(ULocale locale) getRule()booleanCheck whether this holiday occurs at least once between the two dates given.booleanChecks whether this holiday falls on the given date.void
-
Constructor Details
-
Holiday
Construct a new Holiday object. This is for use by subclasses only. This constructs a new holiday with the given name and date rules.- Parameters:
name- The name of this holiday. The getDisplayName method uses this string as a key to look up the holiday's name a resource bundle object named HolidayBundle.rule- The date rules used for determining when this holiday falls. Holiday's implementation of the DateRule interface simply delegates to this DateRule object.
-
-
Method Details
-
getHolidays
-
getHolidays
-
getHolidays
-
firstAfter
Return the first occurrence of this holiday on or after the given date- Specified by:
firstAfterin interfaceDateRule- Parameters:
start- Only holidays on or after this date are returned.- Returns:
- The date on which this holiday occurs, or null if it does not occur on or after the start date.
- See Also:
-
firstBetween
Return the first occurrence of this holiday that is on or after the given start date and before the given end date.- Specified by:
firstBetweenin interfaceDateRule- Parameters:
start- Only occurrences on or after this date are returned.end- Only occurrences before this date are returned.- Returns:
- The date on which this event occurs, or null if it does not occur between the start and end dates.
- See Also:
-
isOn
Checks whether this holiday falls on the given date. This does not take time of day into account; instead it checks whether the holiday and the given date are on the same day. -
isBetween
-
getDisplayName
Return the name of this holiday in the language of the defaultDISPLAYlocale.- See Also:
-
getDisplayName
Return the name of this holiday in the language of the specified locale. Thenameparameter passed to this object's constructor is used as a key to look up the holiday's localized name in a ResourceBundle object named HolidayBundle.- Parameters:
locale- A locale specifying the language in which the name is desired.- See Also:
-
getDisplayName
Return the name of this holiday in the language of the specified locale Thenameparameter passed to this object's constructor is used as a key to look up the holiday's localized name in a ResourceBundle object named HolidayBundle.- Parameters:
locale- A locale specifying the language in which the name is desired.- See Also:
-
getRule
-
setRule
-