-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix the implementation of recurrence format number 1 #45
Comments
The current incorrect implementation also leads to a TimeRecurrence(start_point=TimePoint(year=2020), end_point=TimePoint(year=2022)) |
To give an example of and clarify how our implementation of recurrence fmt 1 is wrong, take the following TimeRecurrence:
According to ISO 8601 this should be a recurrence starting at
However, in our incorrect (but unfortunately longstanding) implementation, the example above means a recurrence starting at the same date-time but ending at |
Quote from ISO/WD 8601-1 (ISO/TC 154/WG 5 N0038, 2016)
(emphasis mine) |
Another thing: the current implementation suffers from floating point errors due to dividing the difference between |
Updated/added relevant tests
Updated/added relevant tests
The first recurrence format does not define repetitions within the given start and end date - it actually just extracts the interval between the start and end date and repeats that starting at the start date. We need to alter the code to represent this.
The text was updated successfully, but these errors were encountered: