java.lang.Object
org.holiday.calendar.function.DateRolls
Factory providing common
DateRoll strategies.- Author:
- Dave Joyce
-
Method Summary
Modifier and TypeMethodDescriptionstatic DateRollCompose two rolls: applyfirst, then applysecond.static DateRollSaturday and Sunday both roll forward to Monday.static DateRollnoRoll()No adjustment — returns the date unchanged.static DateRollSaturday rolls back to Friday; Sunday rolls forward to Monday.static DateRollOnly Sunday rolls forward to the following Monday; Saturday is returned unchanged (no substitute observance).
-
Method Details
-
noRoll
No adjustment — returns the date unchanged. -
previousFridayOrFollowingMonday
Saturday rolls back to Friday; Sunday rolls forward to Monday. -
followingMonday
Saturday and Sunday both roll forward to Monday. -
sundayToMonday
Only Sunday rolls forward to the following Monday; Saturday is returned unchanged (no substitute observance).Implements the Japanese substitute-holiday rule (振替休日): Article 3, paragraph 2 of the Act on National Holidays (国民の祝日に関する法律, 1948, amended 2007) creates a make-up Monday only when a national holiday falls on Sunday. A Saturday holiday has no substitute — it falls on an already- closed day and is returned at its natural date.
- See Also:
-
compose
Compose two rolls: applyfirst, then applysecond.
-