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.
| Modifier and Type | Field and Description |
|---|---|
| public static final SimpleHoliday | ALL_SAINTS_DAY
All Saints' Day, November 1st |
| public static final SimpleHoliday | ALL_SOULS_DAY
All Souls' Day, November 1st |
| public static final SimpleHoliday | ASSUMPTION
Assumption, August 15th |
| public static final SimpleHoliday | BOXING_DAY
Boxing Day, December 26th |
| public static final SimpleHoliday | CHRISTMAS
Christmas, December 25th |
| public static final SimpleHoliday | CHRISTMAS_EVE
Christmas Eve, December 24th |
| public static final SimpleHoliday | EPIPHANY
Epiphany, January 6th |
| public static final SimpleHoliday | IMMACULATE_CONCEPTION
Immaculate Conception, December 8th |
| public static final SimpleHoliday | MAY_DAY
May Day, May 1st |
| public static final SimpleHoliday | NEW_YEARS_DAY
New Year's Day - January 1st |
| public static final SimpleHoliday | NEW_YEARS_EVE
New Year's Eve, December 31st |
| public static final SimpleHoliday | ST_STEPHENS_DAY
Saint Stephen's Day, December 26th |
| Access | Constructor and Description |
|---|---|
| public | SimpleHoliday(int
The month in which this holiday occurs (0-based) month, int The date within the month (1-based). dayOfMonth, String 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. name)Construct an object representing a holiday |
| public | SimpleHoliday(int
The month in which this holiday occurs (0-based) month, int The date within the month (1-based). dayOfMonth, String 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. name, int startYear)Construct an object representing a holiday |
| public | SimpleHoliday(int
The month in which this holiday occurs (0-based) month, int The date within the month (1-based). dayOfMonth, String 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. name, int startYear, int endYear)Construct an object representing a holiday |
| public | SimpleHoliday(int
The month in which this holiday occurs (0-based) month, int A date within the month (1-based). The
interpretation of this parameter depends on the value of
dayOfMonth, int dayOfWeek.The day of the week on which this holiday occurs.
The following values are legal: dayOfWeek, String
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. name)// TODO: remove Construct an object representing a holiday |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static DateRule |
| ALL_SAINTS_DAY | back to summary |
|---|---|
| public static final SimpleHoliday ALL_SAINTS_DAY All Saints' Day, November 1st
| |
| ALL_SOULS_DAY | back to summary |
|---|---|
| public static final SimpleHoliday ALL_SOULS_DAY All Souls' Day, November 1st
| |
| ASSUMPTION | back to summary |
|---|---|
| public static final SimpleHoliday ASSUMPTION Assumption, August 15th
| |
| BOXING_DAY | back to summary |
|---|---|
| public static final SimpleHoliday BOXING_DAY Boxing Day, December 26th
| |
| CHRISTMAS | back to summary |
|---|---|
| public static final SimpleHoliday CHRISTMAS Christmas, December 25th
| |
| CHRISTMAS_EVE | back to summary |
|---|---|
| public static final SimpleHoliday CHRISTMAS_EVE Christmas Eve, December 24th
| |
| EPIPHANY | back to summary |
|---|---|
| public static final SimpleHoliday EPIPHANY Epiphany, January 6th
| |
| IMMACULATE_CONCEPTION | back to summary |
|---|---|
| public static final SimpleHoliday IMMACULATE_CONCEPTION Immaculate Conception, December 8th
| |
| MAY_DAY | back to summary |
|---|---|
| public static final SimpleHoliday MAY_DAY May Day, May 1st
| |
| NEW_YEARS_DAY | back to summary |
|---|---|
| public static final SimpleHoliday NEW_YEARS_DAY New Year's Day - January 1st
| |
| NEW_YEARS_EVE | back to summary |
|---|---|
| public static final SimpleHoliday NEW_YEARS_EVE New Year's Eve, December 31st
| |
| ST_STEPHENS_DAY | back to summary |
|---|---|
| public static final SimpleHoliday ST_STEPHENS_DAY Saint Stephen's Day, December 26th
| |
| SimpleHoliday | back to summary |
|---|---|
| public SimpleHoliday(int month, int dayOfMonth, String name) Construct an object representing a holiday
| |
| SimpleHoliday | back to summary |
|---|---|
| public SimpleHoliday(int month, int dayOfMonth, String name, int startYear) Construct an object representing a holiday
| |
| SimpleHoliday | back to summary |
|---|---|
| public SimpleHoliday(int month, int dayOfMonth, String name, int startYear, int endYear) Construct an object representing a holiday
| |
| SimpleHoliday | back to summary |
|---|---|
| public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name) // TODO: remove Construct an object representing a holiday
| |
| SimpleHoliday | back to summary |
|---|---|
public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name, int startYear)
| |
| SimpleHoliday | back to summary |
|---|---|
public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name, int startYear, int endYear)
| |
| rangeRule | back to summary |
|---|---|
| private static DateRule rangeRule(int startYear, int endYear, DateRule rule) | |