We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 191f093 commit 4d04c0dCopy full SHA for 4d04c0d
src/humanize/time.py
@@ -607,7 +607,9 @@ def precisedelta(
607
for unit, fmt in zip(reversed(Unit), fmts):
608
singular_txt, plural_txt, fmt_value = fmt
609
610
- fmt_value = _rounding_by_fmt(format, fmt_value)
+ if unit == min_unit:
611
+ fmt_value = _rounding_by_fmt(format, fmt_value)
612
+
613
if fmt_value > 0 or (not texts and unit == min_unit):
614
_fmt_value = 2 if 1 < fmt_value < 2 else int(fmt_value)
615
fmt_txt = _ngettext(singular_txt, plural_txt, _fmt_value)
0 commit comments