arrow-py / arrow

🏹 Better dates & times for Python
https://arrow.readthedocs.io
Apache License 2.0
8.63k stars 669 forks source link

.humanize() should have a numeric option for 1 instead of a/an #1158

Open julianLapenna12 opened 12 months ago

julianLapenna12 commented 12 months ago

Feature Request

Option to change "a/an" to 1:

example Arrow.humanize(..., numeric=True)

yiransii commented 11 months ago

I can take on this if someone can verify what's the intended behavior here. From your example, it's hard to tell how is 1 hour much better than an hour

julianLapenna12 commented 11 months ago

The only difference is readability. I have an app that displays times which areow is great for, but when I have multiple listed, people have misinterpreted no number as 0 hours. For example:

Team Time
Blue 2 hours and 3 minutes
Red 3 hours and 47 minutes
Yellow an hour and 58 minutes
Green 2 hours and 39 minutes
Purple 4 hours and 2 minutes

In something similar to this (but larger), I guess when someone skims they don't see a digit and assume 0?

Does that give better context? Let me know if there are other questions.

ganesh-palanikumar commented 9 months ago

@julianLapenna12 If this is still required (and @yiransii is not actively working on this), I can take this up. Have worked with arrow and would love to contribute.