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.
The seven-day Spring Festival window is the statutory public holiday period in China as published by the State Council. Days are consecutive Gregorian calendar days from Day 1 (Chinese New Year's Day) onward.
- 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- 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
-