Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#1237·arrow

Make `dehumanize()` handle values with decimal fractions correctly

Author: HYBRID-BEINGCreated Dec 10, 2025Updated Dec 12, 2025
Labelsenhancement

Feature Request

Currently, dehumanize() is not capable of correctly parsing values with a floating point.

python
>>> arrow.get("2025-12-10T09:00:00").dehumanize("2 days 3.5 hours ago")
<Arrow [2025-12-08T04:00:00+00:00]>

It seems that parser pretty much ignores the part up to the floating point.

A more expected result, however, would be that resulting Arrow object is <Arrow [2025-12-08T05:30:00+00:00]>

Not sure if there is a need to make floating point locale-dependent (ie, . or ,), perhaps it'd be fine to allow both.

Source: arrow-py/arrow

View original on GitHubView discussion on GitHub