Repository navigation
Test: Add unit tests for human-readable date/time formatters - #4388
Open
prabhleen2317 wants to merge 2 commits into
Open
prabhleen2317 wants to merge 2 commits into
prabhleen2317 wants to merge 2 commits into
Conversation
Cover the previously untested to_human_* formatters in pyiceberg/utils/datetime.py, plus micros_to_days and days_to_date.
ebyhr
reviewed
Nov 16, 2026
Cover the Julian/Gregorian boundary (proleptic Gregorian, per spec) in days_to_date, and negative pre-1970 inputs in the human-readable timestamp formatters, per review feedback.
Contributor
Author
|
Thanks for the review, @ebyhr! Addressed both in 4047bb6:
|
Contributor
Author
|
Hello @ebyhr , @Fokko and @rambleraptor could you please have a look towards the changes made ! |
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
to_human_*date/timeformatters in
pyiceberg/utils/datetime.py(
to_human_year/month/day/hour/time/timestamp/timestamptz)micros_to_daysanddays_to_dateCloses #4387
Test plan
make test PYTEST_ARGS="-k datetime"— all passmake lint— clean (ruff, format, mypy, codespell)