Closed jbroudou closed 4 years ago
The common way of implementing this behavior is that both the original and observed/substituted holiday are registered in the Holiday Provider. This is to have the possible to refer to the original holiday (rather than simply replacing it). The substituted holiday will indeed have a string suffix however is a considered a different day.
I think what you are requesting is already in place. Is there perhaps a situation where it is not the case at the moment?
Cheers! Sacha
I see that the substituted holidays are typically suffixed with a string such as "Observed" or "Holiday", but I'm not certain that this is always the case. I was hoping for a property against the substitute day that explicitly states what the original date was.
Cheers
Substituted holidays are represented with the Yasumi\SubstituteHoliday
subclass. You can access the original holiday, i.e. the day being substituted, via the $substitutedHoliday
property.
This issue has been open 60 days with no activity. Please remove the stale label or comment, or this will be closed in 10 days.
This issue has been open 60 days with no activity. Please remove the stale label or comment, or this will be closed in 10 days.
Closing this issue has Yasumi has a way of separating Substituted Holidays and the original substituted holiday.
When an observed day (i.e. holidays that are moved because they are on a weekend) is returned would it possible to flag what the original date was rather than relying on a string suffix?
Also, in some locations when a holiday falls on a weekend, it is moved to a weekday as an observed day. In some of these locations only the observed day is considered a holiday whereas in others both the observed and original days are considered holidays. This is an important distinction in some jurisdictions.
Is there any chance of supporting an additional flag against observed holidays that indicate the original day is or isn't a holiday?