Skip to content

fix: zero-pad ISO week and ordinal years for strptime - #1328

Closed
santhreal wants to merge 4 commits into
arrow-py:masterfrom
santhreal:fix/iso-weekdate-year-padding
Closed

fix: zero-pad ISO week and ordinal years for strptime#1328
santhreal wants to merge 4 commits into
arrow-py:masterfrom
santhreal:fix/iso-weekdate-year-padding

Conversation

@santhreal

@santhreal santhreal commented Jul 18, 2026

Copy link
Copy Markdown

arrow.get hits ValueError when ISO-week-year-under-1000. This PR fixes the regression with a focused test covering the case.

Years before 1000 lost leading zeros after int() conversion, so
strptime rejected valid inputs like 0001-W01-1 and 0001-001.
@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2224255) to head (5671502).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1328   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         2315      2315           
  Branches       358       358           
=========================================
  Hits          2315      2315           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@santhreal santhreal closed this Jul 28, 2026
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