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

I can't reproduce any of the Arrow inconsistencies in the README #581

Closed
AaronBeaudoin opened this issue Nov 16, 2021 · 2 comments
Closed

Comments

@AaronBeaudoin
Copy link

I just tried running the README examples given for Arrow's inconsistent behavior... but I didn't get the same results for any of them. I'm not an expert at datetime manipulation by any means, but nothing looks wrong with the results I got below:

>>> arrow.get('2016-1-17')
<Arrow [2016-01-17T00:00:00+00:00]>
>>> arrow.get('20160413')
<Arrow [2016-04-13T00:00:00+00:00]>
>>> arrow.get('2016-W07-5')
<Arrow [2016-02-19T00:00:00+00:00]>
>>> just_before = arrow.Arrow(2013, 3, 31, 1, 59, 59, 999999, 'Europe/Paris')
>>> just_before
<Arrow [2013-03-31T01:59:59.999999+01:00]>
>>> just_after = just_before.replace(microsecond=1)
>>> just_after
<Arrow [2013-03-31T01:59:59.000001+01:00]>
>>> (just_after.to('utc') - just_before.to('utc')).total_seconds()
-0.999998

You also don't mention at any point which version of Arrow you're comparing against.


I was already thinking of moving to Arrow because of #250, but now I definitely am. Just look at this basic example:

>>> arrow.get(datetime.date.today())
<Arrow [2021-11-16T00:00:00+00:00]>
>>> pendulum.instance(datetime.date.today())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pendulum/__init__.py", line 174, in instance
    raise ValueError("instance() only accepts datetime objects.")
ValueError: instance() only accepts datetime objects.
@karolzlot
Copy link

#556

@Secrus
Copy link
Collaborator

Secrus commented Aug 5, 2022

This section was removed from the README. Closing

@Secrus Secrus closed this as completed Aug 5, 2022
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

3 participants