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

in_words() exclude week #816

Open
liweibenz opened this issue Mar 25, 2024 · 0 comments
Open

in_words() exclude week #816

liweibenz opened this issue Mar 25, 2024 · 0 comments

Comments

@liweibenz
Copy link

hello,Hope to add the exclude week field in the in_words method

import pendulum
dt1 = pendulum.datetime(1988, 2, 10, 22, 33, 55)
dt2 = pendulum.datetime(2024, 2, 25, 5, 55, 10)
dt3 = dt2 - dt1
print(dt3.in_words())
36 years 2 weeks 7 hours 21 minutes 15 seconds

Can return year, month, day, excluding weeks

Expected return result:

36 years 14days 7 hours 21 minutes 15 seconds

@liweibenz liweibenz changed the title in_words() remove week in_words() exclude week Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant