Skip to content

Commit 4f0797a

Browse files
author
jtvhd6
committed
fix: handle decimal string input in intword()
1 parent c2c410c commit 4f0797a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/humanize/number.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def intword(value: NumberOrString, format: str = "%.1f") -> str:
231231
try:
232232
if not math.isfinite(float(value)):
233233
return _format_not_finite(float(value))
234-
value = int(value)
234+
value = int(float(value))
235235
except (TypeError, ValueError):
236236
return str(value)
237237

0 commit comments

Comments
 (0)