You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am implementing Ecuador holidays but I have a problem to get some dates, for example in Ecuador "Primer Grito de la Independencia" is August 10 but holiday depends of the day of the week, following the next rules:
If August 10 is Tuesday, holiday changes to Monday (08-09)
If August 10 is Wednesday, holiday changes to Friday (08-12)
If August 10 is Thursday, holiday changes to Friday (08-11)
If August 10 is Saturday, holiday changes to Friday (08-09)
If August 10 is Sunday, holiday changes to Monday (08-11)
I made the logic to calculate this but assuming that August 10 is Saturday when I get the dates with Holidays::for('ec')->get(); the result is:
...
[
'name' => 'Primer Grito de la Independencia',
'date' => '2024-08-09'
],
...
But the real date is 2024-08-10.
So I would like to know if it is possible to implement something like this:
...
[
'name' => 'Primer Grito de la Independencia',
'date' => '2024-08-09',
'real_date' => '2024-08-10',
],
...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I am implementing Ecuador holidays but I have a problem to get some dates, for example in Ecuador "Primer Grito de la Independencia" is August 10 but holiday depends of the day of the week, following the next rules:
If August 10 is Tuesday, holiday changes to Monday (08-09)
If August 10 is Wednesday, holiday changes to Friday (08-12)
If August 10 is Thursday, holiday changes to Friday (08-11)
If August 10 is Saturday, holiday changes to Friday (08-09)
If August 10 is Sunday, holiday changes to Monday (08-11)
I made the logic to calculate this but assuming that August 10 is Saturday when I get the dates with
Holidays::for('ec')->get();
the result is:But the real date is
2024-08-10
.So I would like to know if it is possible to implement something like this:
Beta Was this translation helpful? Give feedback.
All reactions