arrow-py / arrow

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

Adding brief parameter to humanize #1075

Closed akotha7 closed 1 year ago

akotha7 commented 2 years ago

Pull Request Checklist

Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:

If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!

Description of Changes

Questions

Current implementation shortens into only_distance and then each term. One edge case that occurs for example is "an hour and 6 minutes" should that become "h 6m" or "1h 6m"

Closes #1001

codecov[bot] commented 2 years ago

Codecov Report

Merging #1075 (d70fc86) into master (be57df5) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1075   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         2232      2243   +11     
  Branches       437       441    +4     
=========================================
+ Hits          2232      2243   +11     
Impacted Files Coverage Δ
arrow/arrow.py 100.00% <100.00%> (ø)
arrow/locales.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update be57df5...d70fc86. Read the comment docs.

anishnya commented 2 years ago

@jadchaar @krisfremen @systemcatch, what are your thoughts here?

systemcatch commented 2 years ago

@akotha7 I tend to think we should use the 1h 6m as this seems more consistent to me.

I will try to look this over properly in the next few days.