arrow-py / arrow-py/arrow

Shortened time units

Open
#1,269 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
9.1k
Forks
784
PR merge metrics
No merged PRs in 30d

Description

I originally thought this was a bug, but seeing #1150 has explained why I'm hitting that as well as the behaviour I'm getting here. Since issue suggests matching the output of humanize is the intended result, I'm calling this a feature request. Dehumanize should, ideally, support shortening minutes and seconds to mins and secs respectively.

`arrow.utcnow().dehumanize("50 mins ago")` and `arrow.utcnow().dehumanize("50 secs ago")` both result in the exception `ValueError: Input string not valid.`

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the dehumanize implementation and its related tests, then trace how it parses the existing full “minutes” and “seconds” forms. Verify that “50 mins ago” and “50 secs ago” are accepted while existing humanize output and longer unit forms remain unchanged, then run the relevant test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.