|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.icu.util.Holiday
public abstract class Holiday
An abstract class representing a holiday.
| Constructor Summary | |
|---|---|
protected |
Holiday(String name,
DateRule rule)
Construct a new Holiday object. |
| Method Summary | |
|---|---|
Date |
firstAfter(Date start)
Return the first occurrence of this holiday on or after the given date |
Date |
firstBetween(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. |
String |
getDisplayName()
Return the name of this holiday in the language of the default locale. |
String |
getDisplayName(Locale locale)
Return the name of this holiday in the language of the specified locale. |
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. |
static Holiday[] |
getHolidays()
|
static Holiday[] |
getHolidays(Locale locale)
|
static Holiday[] |
getHolidays(ULocale locale)
|
DateRule |
getRule()
|
boolean |
isBetween(Date start,
Date end)
Check whether this holiday occurs at least once between the two dates given. |
boolean |
isOn(Date date)
Checks whether this holiday falls on the given date. |
void |
setRule(DateRule rule)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Holiday(String name,
DateRule rule)
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 Detail |
|---|
public static Holiday[] getHolidays()
public static Holiday[] getHolidays(Locale locale)
public static Holiday[] getHolidays(ULocale locale)
public Date firstAfter(Date start)
firstAfter in interface DateRulestart - Only holidays on or after this date are returned.
firstBetween(java.util.Date, java.util.Date)
public Date firstBetween(Date start,
Date end)
firstBetween in interface DateRulestart - Only occurrences on or after this date are returned.end - Only occurrences before this date are returned.
firstAfter(java.util.Date)public boolean isOn(Date date)
isOn in interface DateRuledate - The date to check.
public boolean isBetween(Date start,
Date end)
isBetween in interface DateRulepublic String getDisplayName()
public String getDisplayName(Locale locale)
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.
locale - A locale specifying the language in which the name is desired.ResourceBundlepublic String getDisplayName(ULocale locale)
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.
locale - A locale specifying the language in which the name is desired.ResourceBundlepublic DateRule getRule()
public void setRule(DateRule rule)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||