Skip to content

Make dehumanize() handle values with decimal fractions correctly #1237

@HYBRID-BEING

Description

@HYBRID-BEING

Feature Request

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

>>> 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions