Skip to content

Conversation

@eldipa
Copy link
Contributor

@eldipa eldipa commented May 16, 2022

Fixes #14

Changes proposed in this pull request:

  • Propagate correctly the days to hours in precisedelta
  • Propose a truncate flag to truncate and remove values too close to zero in precisedelta

Note: I don't feel that truncate is the correct name and I think that it could be easily misinterpreted. We need a better name.
This PR also does not include a documentation for this flag nor tests (but a file in tests/issue-14-days-hours-boundary-in-precisedelta.md describes and tests all the cases discussed in #14 so it can be used as the base for an unit test and/or as the tests themselves running them with byexample )

Closes #14

@codecov-commenter
Copy link

codecov-commenter commented May 16, 2022

Codecov Report

❌ Patch coverage is 30.00000% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.54%. Comparing base (410b51d) to head (cf7ec9d).
⚠️ Report is 466 commits behind head on main.

Files with missing lines Patch % Lines
src/humanize/time.py 30.00% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
- Coverage   99.68%   97.54%   -2.14%     
==========================================
  Files           9        9              
  Lines         635      653      +18     
==========================================
+ Hits          633      637       +4     
- Misses          2       16      +14     
Flag Coverage Δ
macos-latest 96.32% <30.00%> (-2.11%) ⬇️
ubuntu-latest 96.32% <30.00%> (-2.11%) ⬇️
windows-latest 96.01% <30.00%> (-2.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dangillet
Copy link
Contributor

@hugovk I think this PR could be closed. #254 was merged and superseded this one.

@hugovk
Copy link
Member

hugovk commented Nov 11, 2025

Thanks all!

@hugovk hugovk closed this Nov 11, 2025
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.

Issues with odd months when restricting to "day" precision (precisedelta)

4 participants