Module org.holiday.calendar.apac
Class ChineseNewYearDay
java.lang.Object
org.holiday.calendar.observance.AbstractObservance
org.holiday.calendar.observance.lunar.ChineseNewYearDay
Observance of a specific day within the Chinese New Year (Spring Festival)
holiday window, numbered from Day 1 (the first day of the first lunar month)
through Day 7.
Days are consecutive Gregorian calendar days beginning from Day 1
(Chinese New Year's Day). The valid range 1–7 supports both the
three-day statutory minimum window (national CN calendar, Days 1–3)
and the seven-day PBOC operational window (CNY calendar, Days 1–7).
- Author:
- Dave Joyce
-
Constructor Summary
ConstructorsConstructorDescriptionChineseNewYearDay(int dayNumber) Constructs an observance for the given day of the Spring Festival window. -
Method Summary
Modifier and TypeMethodDescriptionprotected LocalDatecomputeDate(int year) Compute the date for this observance in the given year.Methods inherited from class org.holiday.calendar.observance.AbstractObservance
apply, isValidYear, test
-
Constructor Details
-
ChineseNewYearDay
public ChineseNewYearDay(int dayNumber) Constructs an observance for the given day of the Spring Festival window.- Parameters:
dayNumber- day within the Spring Festival window, in range1–7; values 1–3 model the statutory national (CN) calendar, values 1–7 model the PBOC operational (CNY) calendar- Throws:
IllegalArgumentException- ifdayNumberis not in range 1–7
-
-
Method Details
-
computeDate
Description copied from class:AbstractObservanceCompute the date for this observance in the given year. Only called whenAbstractObservance.isValidYear(int)returnstrue.- Specified by:
computeDatein classAbstractObservance- Parameters:
year- the year for which to compute the date- Returns:
- computed holiday date
-