Conversation
2015-W00 parsed as 22 December 2014. 2015-W01-0 parsed as 28 December 2014. 2012-W05 is still 30 January 2012.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
parse_iso8601("2015-W00")returned 22 December 2014.parse_iso8601("2015-W01-0")returned 28 December 2014. The week and weekday checks only had an upper bound.2012-W05is still 30 January 2012, and2009-W53-7is still 3 January 2010.Test plan
pytest tests/parsing/test_parse_iso8601.pyfailed before the fix (2015-W00did not raise) and passes after it (55 tests), withPENDULUM_EXTENSIONS=02014-12-22and2014-12-28before the fix, and raises after it.2012-W05is still2012-01-30Made with Cursor