Closed sebastianpisula closed 3 years ago
Thank you @sebastianpisula Let me have a look and get back to you.
@sebastianpisula You should use the workingDays
parameter of the nextWorkingDay function, which tells until how many days ahead Yasumi need to look for the next working day.
However I think this function is broken, as my tests don't give the expected next working day even after setting the appropriate workingDays
value.
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.
It still doesn't work correctly. I expect that if I have holidays in Poland, and I add a new date, Yasumi::nextWorkingDay will take this into account. For example - in Poland we have holidays on December 24th, 25th, and 26th. If I add December 27th and run the script with the date 23rd, I expect that the next working day will be December 28th.
$holidays = Yasumi::create( 'Poland', 2022 ); $holidays->addHoliday( new Holiday( 'Holiday 1', [], new \DateTimeImmutable( '2022-12-27' ) ) );
var_dump( Yasumi::nextWorkingDay( 'Poland', new \DateTimeImmutable('2022-12-23') )->format( 'Y-m-d' ) );
@sebastianpisula Thanks for the feedback. I will have a look later this week.
Hi,
I would like to use Yasumi as engine for calculation for delivery date but I would like to include holiday (for example seller has holiday).
Expected result: 2020-08-31