| |
|
| java.lang.Object com.ibm.icu.util.Holiday
All known Subclasses: com.ibm.icu.util.SimpleHoliday, com.ibm.icu.util.EasterHoliday, com.ibm.icu.util.HebrewHoliday,
Holiday | abstract public class Holiday implements DateRule(Code) | | An abstract class representing a holiday.
|
Method Summary | |
public Date | firstAfter(Date start) Return the first occurrance of this holiday on or after the given date
Parameters: start - Only holidays on or after this date are returned. | public Date | firstBetween(Date start, Date end) Return the first occurrance of this holiday that is on or after
the given start date and before the given end date.
Parameters: start - Only occurrances on or after this date are returned. Parameters: end - Only occurrances before this date are returned. | public String | getDisplayName() | public String | getDisplayName(Locale locale) Return the name of this holiday in the language of the specified locale
The name parameter 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. | public String | getDisplayName(ULocale locale) Return the name of this holiday in the language of the specified locale
The name parameter 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. | public static Holiday[] | getHolidays() | public static Holiday[] | getHolidays(Locale locale) | public static Holiday[] | getHolidays(ULocale locale) | public DateRule | getRule() | public boolean | isBetween(Date start, Date end) Check whether this holiday occurs at least once between the two
dates given. | public boolean | isOn(Date date) Checks whether this holiday falls on the given date. | public void | setRule(DateRule rule) |
Holiday | protected Holiday(String name, DateRule rule)(Code) | | 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 methoduses this string as a key to look up the holiday's name aresource bundle object named HolidayBundle. Parameters: rule - The date rules used for determining when this holidayfalls. Holiday's implementation of the DateRule intefacesimply delegates to this DateRule object. |
firstAfter | public Date firstAfter(Date start)(Code) | | Return the first occurrance of this holiday on or after the given date
Parameters: start - Only holidays on or after this date are returned. The date on which this holiday occurs, or null if itdoes not occur on or after the start date. See Also: Holiday.firstBetween |
firstBetween | public Date firstBetween(Date start, Date end)(Code) | | Return the first occurrance of this holiday that is on or after
the given start date and before the given end date.
Parameters: start - Only occurrances on or after this date are returned. Parameters: end - Only occurrances before this date are returned. The date on which this event occurs, or null if itdoes not occur between the start and end dates. See Also: Holiday.firstAfter |
getDisplayName | public String getDisplayName()(Code) | | Return the name of this holiday in the language of the default locale
|
getDisplayName | public String getDisplayName(Locale locale)(Code) | | Return the name of this holiday in the language of the specified locale
The name parameter 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: ResourceBundle |
getDisplayName | public String getDisplayName(ULocale locale)(Code) | | Return the name of this holiday in the language of the specified locale
The name parameter 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: ResourceBundle |
isBetween | public boolean isBetween(Date start, Date end)(Code) | | Check whether this holiday occurs at least once between the two
dates given.
|
isOn | public boolean isOn(Date date)(Code) | | 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.
Parameters: date - The date to check. true if this holiday occurs on the given date. |
|
|
|