Enum Class ChinaHolidayCalendar.DayKind
java.lang.Object
java.lang.Enum<ChinaHolidayCalendar.DayKind>
cloud.opencode.base.date.holiday.ChinaHolidayCalendar.DayKind
- All Implemented Interfaces:
Serializable, Comparable<ChinaHolidayCalendar.DayKind>, Constable
- Enclosing class:
ChinaHolidayCalendar
Kind of a calendar day under State-Council holiday rules.
国务院假期规则下日期的类别。
- Since:
- JDK 25, opencode-base-date V1.0.4
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionHoliday rest day declared by the State Council.Makeup workday (a weekend reassigned as a workday).Weekend (Sat/Sun) rest day, not adjusted to a workday.Normal workday (Mon-Fri, not a holiday). -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this day is a rest day.booleanWhether this day is a workday.static ChinaHolidayCalendar.DayKindReturns the enum constant of this class with the specified name.static ChinaHolidayCalendar.DayKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WORKDAY
Normal workday (Mon-Fri, not a holiday). 普通工作日(周一至周五,非假日)。 -
WEEKEND_REST
Weekend (Sat/Sun) rest day, not adjusted to a workday. 周末休息日,未调班。 -
HOLIDAY_REST
Holiday rest day declared by the State Council. 国务院发布的法定假日。 -
MAKEUP_WORKDAY
Makeup workday (a weekend reassigned as a workday). 调休补班日(周末调为工作日)。
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isWorkday
public boolean isWorkday()Whether this day is a workday. 是否为工作日。- Returns:
- true if workday | 工作日返回 true
-
isRestDay
public boolean isRestDay()Whether this day is a rest day. 是否为休息日。- Returns:
- true if rest day | 休息日返回 true
-