We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, I'm having trouble comparing the result of subtracting two DateTimes with a timedelta. If I run the following snippet:
timedelta
import pendulum from pendulum.period import Period from datetime import timedelta d1 = pendulum.datetime(2019, 1, 2, tz='UTC') d2 = pendulum.datetime(2019, 1, 1, tz='UTC') period = d1 - d2 print(period == timedelta(days=1))
I get the following error, instead of the True I was expecting:
True
AttributeError: 'datetime.timedelta' object has no attribute 'start'
The text was updated successfully, but these errors were encountered:
Comparison against anything that was not a Period was broken, opened a PR to fail over to Duration if other is not a Period.
other
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Hello, I'm having trouble comparing the result of subtracting two DateTimes with a
timedelta
. If I run the following snippet:I get the following error, instead of the
True
I was expecting:The text was updated successfully, but these errors were encountered: