Top Description Fields Constructors Methods
com.ibm.icu.util

public Class SimpleHoliday

extends Holiday
Class Inheritance
Imports
java.util.Date

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.

ICU Status
Draft since ICU 2.8 (retainAll).

Field Summary

Modifier and TypeField 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

Constructor Summary

AccessConstructor 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 dayOfWeek.
dayOfMonth
,
int
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
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
SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name, int startYear)

public
SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name, int startYear, int endYear)

Method Summary

Modifier and TypeMethod and Description
private static DateRule
rangeRule(int startYear, int endYear, DateRule rule)

Inherited from com.ibm.icu.util.Holiday:
firstAfterfirstBetweengetDisplayNamegetDisplayNamegetDisplayNamegetHolidaysgetHolidaysgetHolidaysgetRuleisBetweenisOnsetRule

Field Detail

ALL_SAINTS_DAYback to summary
public static final SimpleHoliday ALL_SAINTS_DAY

All Saints' Day, November 1st

ICU Status
Draft since ICU 2.8.
ALL_SOULS_DAYback to summary
public static final SimpleHoliday ALL_SOULS_DAY

All Souls' Day, November 1st

ICU Status
Draft since ICU 2.8.
ASSUMPTIONback to summary
public static final SimpleHoliday ASSUMPTION

Assumption, August 15th

ICU Status
Draft since ICU 2.8.
BOXING_DAYback to summary
public static final SimpleHoliday BOXING_DAY

Boxing Day, December 26th

ICU Status
Draft since ICU 2.8.
CHRISTMASback to summary
public static final SimpleHoliday CHRISTMAS

Christmas, December 25th

ICU Status
Draft since ICU 2.8.
CHRISTMAS_EVEback to summary
public static final SimpleHoliday CHRISTMAS_EVE

Christmas Eve, December 24th

ICU Status
Draft since ICU 2.8.
EPIPHANYback to summary
public static final SimpleHoliday EPIPHANY

Epiphany, January 6th

ICU Status
Draft since ICU 2.8.
IMMACULATE_CONCEPTIONback to summary
public static final SimpleHoliday IMMACULATE_CONCEPTION

Immaculate Conception, December 8th

ICU Status
Draft since ICU 2.8.
MAY_DAYback to summary
public static final SimpleHoliday MAY_DAY

May Day, May 1st

ICU Status
Draft since ICU 2.8.
NEW_YEARS_DAYback to summary
public static final SimpleHoliday NEW_YEARS_DAY

New Year's Day - January 1st

ICU Status
Draft since ICU 2.8.
NEW_YEARS_EVEback to summary
public static final SimpleHoliday NEW_YEARS_EVE

New Year's Eve, December 31st

ICU Status
Draft since ICU 2.8.
ST_STEPHENS_DAYback to summary
public static final SimpleHoliday ST_STEPHENS_DAY

Saint Stephen's Day, December 26th

ICU Status
Draft since ICU 2.8.

Constructor Detail

SimpleHolidayback to summary
public SimpleHoliday(int month, int dayOfMonth, String name)

Construct an object representing a holiday

Parameters
month:int

The month in which this holiday occurs (0-based)

dayOfMonth:int

The date within the month (1-based).

name: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.

ICU Status
Draft since ICU 2.8.
See Also
Holiday#getDisplayName(java.util.Locale)
SimpleHolidayback to summary
public SimpleHoliday(int month, int dayOfMonth, String name, int startYear)

Construct an object representing a holiday

Parameters
month:int

The month in which this holiday occurs (0-based)

dayOfMonth:int

The date within the month (1-based).

name: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.

ICU Status
Draft since ICU 2.8.
See Also
Holiday#getDisplayName(java.util.Locale)
SimpleHolidayback to summary
public SimpleHoliday(int month, int dayOfMonth, String name, int startYear, int endYear)

Construct an object representing a holiday

Parameters
month:int

The month in which this holiday occurs (0-based)

dayOfMonth:int

The date within the month (1-based).

name: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.

ICU Status
Draft since ICU 2.8.
See Also
Holiday#getDisplayName(java.util.Locale)
SimpleHolidayback to summary
public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name)

// TODO: remove Construct an object representing a holiday

Parameters
month:int

The month in which this holiday occurs (0-based)

dayOfMonth:int

A date within the month (1-based). The interpretation of this parameter depends on the value of dayOfWeek.

dayOfWeek:int

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: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.

ICU Status
Draft since ICU 2.8.
See Also
Holiday#getDisplayName(java.util.Locale)
SimpleHolidayback to summary
public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name, int startYear)
ICU Status
Draft since ICU 2.8.
SimpleHolidayback to summary
public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name, int startYear, int endYear)
ICU Status
Draft since ICU 2.8.

Method Detail

rangeRuleback to summary
private static DateRule rangeRule(int startYear, int endYear, DateRule rule)