/* GENERATED SOURCE. DO NOT MODIFY. */
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 1996-2016, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
package android.icu.util;
import 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.
*
* @hide Only a subset of ICU is exposed in Android
* @hide draft / provisional / internal are hidden on Android
*/
public class SimpleHoliday extends Holiday {
/**
* Construct an object representing a holiday
*
* @param month The month in which this holiday occurs (0-based)
* @param dayOfMonth The date within the month (1-based).
*
* @param name 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.
*
* @see Holiday#getDisplayName(java.util.Locale)
* @hide draft / provisional / internal are hidden on Android
*/
public SimpleHoliday(int month, int dayOfMonth, String name)
{
super(name, new SimpleDateRule(month, dayOfMonth));
}
/**
* Construct an object representing a holiday
*
* @param month The month in which this holiday occurs (0-based)
* @param dayOfMonth The date within the month (1-based).
*
* @param name 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.
*
* @see Holiday#getDisplayName(java.util.Locale)
* @hide draft / provisional / internal are hidden on Android
*/
public SimpleHoliday(int month, int dayOfMonth, String name,
int startYear)
{
super(name, rangeRule(startYear, 0, new SimpleDateRule(month, dayOfMonth)));
}
/**
* Construct an object representing a holiday
*
* @param month The month in which this holiday occurs (0-based)
* @param dayOfMonth The date within the month (1-based).
*
* @param name 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.
*
* @see Holiday#getDisplayName(java.util.Locale)
* @hide draft / provisional / internal are hidden on Android
*/
public SimpleHoliday(int month, int dayOfMonth, String name,
int startYear, int endYear)
{
super(name, rangeRule(startYear, endYear, new SimpleDateRule(month, dayOfMonth)));
}
/** // TODO: remove
* Construct an object representing a holiday
*
* @param month The month in which this holiday occurs (0-based)
*
* @param dayOfMonth A date within the month (1-based). The
* interpretation of this parameter depends on the value of
* dayOfWeek
.
*
* @param dayOfWeek The day of the week on which this holiday occurs.
* The following values are legal: