Closed mercury64 closed 7 months ago
Victoria Day in Canada for the year 2024 is May 20th. The tests snapshot has the date as May 27th which is incorrect for the year 2024.
The code for calculating Victoria Day is incorrect.
Victoria Day is always the preceding Monday from May 25th. It falls on the Monday between the 18th and the 24th.
The test case is incorrect. Adding the correct date in the test snapshot creates a failed test.
The code for calculating Victoria Day is incorrect, this is the bug.
main
PHP 8.3.3 (cli) (built: Feb 13 2024 15:41:14) (NTS)
macOS, Windows, Linux
I have updated the test snapshot with the correct date for Victoria Day. I have created a code fix for Canada Victoria Day calculation.
I will create a pull request.
Fix: Canada Victoria Day correction in test and calculation #211
Thanks!
What happened?
Victoria Day in Canada for the year 2024 is May 20th. The tests snapshot has the date as May 27th which is incorrect for the year 2024.
The code for calculating Victoria Day is incorrect.
Victoria Day is always the preceding Monday from May 25th. It falls on the Monday between the 18th and the 24th.
How to reproduce the bug
The test case is incorrect. Adding the correct date in the test snapshot creates a failed test.
The code for calculating Victoria Day is incorrect, this is the bug.
Package Version
main
PHP Version
PHP 8.3.3 (cli) (built: Feb 13 2024 15:41:14) (NTS)
Which operating systems does with happen with?
macOS, Windows, Linux
Notes
I have updated the test snapshot with the correct date for Victoria Day. I have created a code fix for Canada Victoria Day calculation.
I will create a pull request.