Skip to content

Commit ffebe0f

Browse files
authored
Merge pull request #556 from jadchaar/arrow-docs
Remove 'why not arrow' section from docs
2 parents eb42900 + 4bd6290 commit ffebe0f

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

README.rst

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -74,55 +74,6 @@ and by default in ``UTC`` for ease of use.
7474

7575
Pendulum also improves the standard ``timedelta`` class by providing more intuitive methods and properties.
7676

77-
78-
Why not Arrow?
79-
==============
80-
81-
Arrow is the most popular datetime library for Python right now, however its behavior
82-
and API can be erratic and unpredictable. The ``get()`` method can receive pretty much anything
83-
and it will try its best to return something while silently failing to handle some cases:
84-
85-
.. code-block:: python
86-
87-
arrow.get('2016-1-17')
88-
# <Arrow [2016-01-01T00:00:00+00:00]>
89-
90-
pendulum.parse('2016-1-17')
91-
# <Pendulum [2016-01-17T00:00:00+00:00]>
92-
93-
arrow.get('20160413')
94-
# <Arrow [1970-08-22T08:06:53+00:00]>
95-
96-
pendulum.parse('20160413')
97-
# <Pendulum [2016-04-13T00:00:00+00:00]>
98-
99-
arrow.get('2016-W07-5')
100-
# <Arrow [2016-01-01T00:00:00+00:00]>
101-
102-
pendulum.parse('2016-W07-5')
103-
# <Pendulum [2016-02-19T00:00:00+00:00]>
104-
105-
# Working with DST
106-
just_before = arrow.Arrow(2013, 3, 31, 1, 59, 59, 999999, 'Europe/Paris')
107-
just_after = just_before.replace(microseconds=1)
108-
'2013-03-31T02:00:00+02:00'
109-
# Should be 2013-03-31T03:00:00+02:00
110-
111-
(just_after.to('utc') - just_before.to('utc')).total_seconds()
112-
-3599.999999
113-
# Should be 1e-06
114-
115-
just_before = pendulum.datetime(2013, 3, 31, 1, 59, 59, 999999, 'Europe/Paris')
116-
just_after = just_before.add(microseconds=1)
117-
'2013-03-31T03:00:00+02:00'
118-
119-
(just_after.in_timezone('utc') - just_before.in_timezone('utc')).total_seconds()
120-
1e-06
121-
122-
Those are a few examples showing that Arrow cannot always be trusted to have a consistent
123-
behavior with the data you are passing to it.
124-
125-
12677
Limitations
12778
===========
12879

0 commit comments

Comments
 (0)