Skip to content

fix(date): fix endOf week date functionality#444

Open
TheCaffinatedDeveloper wants to merge 1 commit intogorules:masterfrom
TheCaffinatedDeveloper:fix/end_of_week_calculation
Open

fix(date): fix endOf week date functionality#444
TheCaffinatedDeveloper wants to merge 1 commit intogorules:masterfrom
TheCaffinatedDeveloper:fix/end_of_week_calculation

Conversation

@TheCaffinatedDeveloper
Copy link
Copy Markdown

Fix endOf('week') to return the correct Sunday for all weekdays. The previous implementation used the wrong weekday offset, which caused incorrect results for some inputs.

This updates the week-end calculation to align with the documented Monday-to-Sunday week semantics and adds regression coverage for start/end-of-period behavior based on the date examples in the docs: docs.gorules.io/learn/zen-language/dates#start-and-end-of-periods.

References #443.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant