Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support timezone-aware datetimes in naturaltime #100

Merged
merged 1 commit into from
Mar 16, 2023
Merged

Support timezone-aware datetimes in naturaltime #100

merged 1 commit into from
Mar 16, 2023

Conversation

tandav
Copy link
Contributor

@tandav tandav commented Feb 26, 2023

Fixes #17

Changes proposed in this pull request:

  • support timezone-aware datetimes in naturaltime

example:

>>> import datetime
>>> import humanize
>>> dt = datetime.datetime.now(tz=datetime.timezone.utc)
>>> humanize.naturaltime(dt)
'now'

@tandav tandav changed the title support timezone-aware datetimes in naturaltime #17 support timezone-aware datetimes in naturaltime Feb 26, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.06%. Comparing base (bdc5cb6) to head (ed6c3b0).
Report is 157 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #100   +/-   ##
=======================================
  Coverage   99.05%   99.06%           
=======================================
  Files           9        9           
  Lines         743      749    +6     
=======================================
+ Hits          736      742    +6     
  Misses          7        7           
Flag Coverage Δ
macos-latest 97.86% <100.00%> (+0.01%) ⬆️
ubuntu-latest 97.86% <100.00%> (+0.01%) ⬆️
windows-latest 95.99% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tandav
Copy link
Contributor Author

tandav commented Feb 27, 2023

UPD: I don't have rights to assign a label to PR, so label check pipeline failed

@hugovk hugovk added the changelog: Added For new features label Feb 27, 2023
@hugovk hugovk changed the title support timezone-aware datetimes in naturaltime Support timezone-aware datetimes in naturaltime Mar 16, 2023
@hugovk hugovk merged commit 75abba2 into python-humanize:main Mar 16, 2023
@hugovk
Copy link
Member

hugovk commented Mar 16, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: Added For new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

naturaltime should support timezone-aware datetimes
3 participants