Sunday, July 7, 2024
1 change · 17.0
Resolved issues and error corrections
This fix resolves test failures in the timesheet grid module that occurred on Sundays. The issue was caused by inconsistent week day indexing between the Python backend (where weeks start on Monday) and the JavaScript frontend (where weeks start on Sunday). The fix aligns how both systems calculate days to ensure consistent behavior across all days of the week.
Original PR description
The week starts (index 0) on Monday python side, and on Sunday Javascript side. To be able to have both function, the part where we add 7 days to `daysToLastWeekWed` or `days_to_last_weekWed` needs to be done the same way on both sides: from Wednesday to Sunday: * index 2 (WE) to 6 (SU) in Python * index 3 (WE) to 6 (SA) and 0 (SU) in Javascript.