Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too restrictive assumptions about calendar weeks #154

Open
HeikoTheissen opened this issue Dec 3, 2021 · 0 comments · May be fixed by #155
Open

Too restrictive assumptions about calendar weeks #154

HeikoTheissen opened this issue Dec 3, 2021 · 0 comments · May be fixed by #155

Comments

@HeikoTheissen
Copy link
Contributor

HeikoTheissen commented Dec 3, 2021

<String>Property encodes a calendar week number as string following the logical pattern WW consisting of two digits.
The string matches the regex pattern 0[1-9]|[1-4][0-9]|5[0-3]

makes too restrictive assumptions about what a week is. As explained on Wikipedia, if a leap year in the US starts on Saturday and ends on Sunday, that year has 54 weeks (the first and last of which contain only one day each), but the pattern above does not allow week numbers beyond 53.

Attempts at a calendar-week-based arithmetic should perhaps be discouraged.

@HeikoTheissen HeikoTheissen linked a pull request Dec 6, 2021 that will close this issue
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 a pull request may close this issue.

1 participant