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

Remove 'why not arrow' section from docs #556

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

jadchaar
Copy link
Contributor

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

The "Why not Arrow?" section of the documentation is no longer relevant since all of these issues have been resolved in Arrow since version 0.17.0 (released last year):

envpython3
Python 3.9.5 (default, May  4 2021, 03:36:27)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import arrow
>>> import pendulum
>>> arrow.__version__
'1.1.0'
>>> pendulum.__version__
'2.1.2'
>>> arrow.get('2016-1-17')
2016-01-17T00:00:00+00:00
>>> pendulum.parse('2016-1-17')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jadchaar/Downloads/test-arrow/env/lib/python3.9/site-packages/pendulum/parser.py", line 29, in parse
    return _parse(text, **options)
  File "/Users/jadchaar/Downloads/test-arrow/env/lib/python3.9/site-packages/pendulum/parser.py", line 45, in _parse
    parsed = base_parse(text, **options)
  File "/Users/jadchaar/Downloads/test-arrow/env/lib/python3.9/site-packages/pendulum/parsing/__init__.py", line 74, in parse
    return _normalize(_parse(text, **_options), **_options)
  File "/Users/jadchaar/Downloads/test-arrow/env/lib/python3.9/site-packages/pendulum/parsing/__init__.py", line 128, in _parse
    raise ParserError("Unable to parse string [{}]".format(text))
pendulum.parsing.exceptions.ParserError: Unable to parse string [2016-1-17]
>>> arrow.get('20160413')
2016-04-13T00:00:00+00:00
>>> pendulum.parse('20160413')
2016-04-13T00:00:00+00:00
>>> arrow.get('2016-W07-5')
2016-02-19T00:00:00+00:00
>>> pendulum.parse('2016-W07-5')
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.shift(microseconds=1)
>>> just_after
<Arrow [2013-03-31T03:00:00+02:00]>
>>> (just_after.to('utc') - just_before.to('utc')).total_seconds()
1e-06
>>> just_before = pendulum.datetime(2013, 3, 31, 1, 59, 59, 999999, 'Europe/Paris')
>>> just_before
DateTime(2013, 3, 31, 1, 59, 59, 999999, tzinfo=Timezone('Europe/Paris'))
>>> just_after = just_before.add(microseconds=1)
>>> just_after
DateTime(2013, 3, 31, 3, 0, 0, tzinfo=Timezone('Europe/Paris'))
>>> (just_after.in_timezone('utc') - just_before.in_timezone('utc')).total_seconds()
1e-06

Since all of these issues are now resolved, I think it is fair to remove this section from the documentation :). Disclaimer: I am one of the maintainers of Arrow.

Thanks in advance!

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

Successfully merging this pull request may close these issues.

2 participants