Rounding
See original GitHub issueOne oddity to me is the rounding. While I can understand that
humanize.naturaltime(2*365*24*60*60 - 1)
is 1 year, 11 months ago
and not 2 years ago
, because the year is not complete yet and we don’t celebrate birthdays early (“how long ago was it?” - “2 years?” - “not yet!”), my intuitive expectation of
humanize.naturaldelta(2*365*24*60*60 - 1)
is actually 2 years
- because with deltas (“how long did it take?”), I feel rounding is much more natural.
So for 101_943 / 1_000_000
, I’d probably expect 102 milliseconds
.
_Originally posted by @bersbersbers in https://github.com/jmoiron/humanize/issues/75#issuecomment-659220243_
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Rounding Numbers Calculator
Round numbers to thousands, hundreds, tens, ones, tenths, hundredths and thousandths. Online calculator for rounding numbers and show steps.
Read more >Rounding
Rounding means replacing a number with an approximate value that has a shorter, simpler, or more explicit representation. For example, replacing $23.4476 ...
Read more >Rounding Numbers
Rounding means making a number simpler but keeping its value close to what it was. The result is less accurate, but easier to...
Read more >Rounding Calculator
Free tool to round numbers to thousands, hundreds, tens, tenths, hundredths, fractions, or many other levels of precision using the popular rounding ......
Read more >Math Antics - Rounding - YouTube
Learn More at mathantics.comVisit http://www.mathantics.com for more Free math videos and additional subscription based content!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That does help, thanks. A few tests that I did revealed these unexpected ones:
I did not test further as it seems an error needs to be fixed first.
🚀 Development has moved to https://github.com/python-humanize/humanize 🚀
Please open new issues at https://github.com/python-humanize/humanize/issues