Repository navigation
Conversation
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.
from_format()cannot round-trip day-of-year formats for years before 1000. For example,pendulum.from_format("0001-031", "YYYY-DDDD")raisesParserError: Unable to parse string [1-031], although the original string is valid. The formatter converts the year to an integer and then reconstructs the ISO ordinal date without padding it back to four digits.Keep the year zero-padded when constructing that intermediate date. Add coverage for
DDDandDDDD, the minimum and maximum years, a leap day, the year 1000 boundary, time/offset preservation, and invalid dates. The new 16 cases produce 9 failures and 7 passes on the original code.Validation on Windows / Python 3.12.14:
mypy: success, 228 source files.git diff --checkpasses.Pull Request Check List
Prepared with Codex (GPT-6) assistance.