@@ -10,9 +10,10 @@ Pendulum
1010.. image :: https://img.shields.io/codecov/c/github/sdispater/pendulum/master.svg
1111 :target: https://codecov.io/gh/sdispater/pendulum/branch/master
1212
13- .. image :: https://travis-ci.org /sdispater/pendulum.svg
13+ .. image :: https://github.com /sdispater/pendulum/actions/workflows/tests.yml/badge .svg
1414 :alt: Pendulum Build status
15- :target: https://travis-ci.org/sdispater/pendulum
15+ :target: https://github.com/sdispater/pendulum/actions
16+
1617
1718Python datetimes made easy.
1819
@@ -36,7 +37,7 @@ Supports Python **2.7** and **3.4+**.
3637
3738 >> > past = pendulum.now().subtract(minutes = 2 )
3839 >> > past.diff_for_humans()
39- >> > ' 2 minutes ago'
40+ ' 2 minutes ago'
4041
4142 >> > delta = past - last_week
4243 >> > delta.hours
@@ -73,55 +74,6 @@ and by default in ``UTC`` for ease of use.
7374
7475Pendulum also improves the standard ``timedelta `` class by providing more intuitive methods and properties.
7576
76-
77- Why not Arrow?
78- ==============
79-
80- Arrow is the most popular datetime library for Python right now, however its behavior
81- and API can be erratic and unpredictable. The ``get() `` method can receive pretty much anything
82- and it will try its best to return something while silently failing to handle some cases:
83-
84- .. code-block :: python
85-
86- arrow.get(' 2016-1-17' )
87- # <Arrow [2016-01-01T00:00:00+00:00]>
88-
89- pendulum.parse(' 2016-1-17' )
90- # <Pendulum [2016-01-17T00:00:00+00:00]>
91-
92- arrow.get(' 20160413' )
93- # <Arrow [1970-08-22T08:06:53+00:00]>
94-
95- pendulum.parse(' 20160413' )
96- # <Pendulum [2016-04-13T00:00:00+00:00]>
97-
98- arrow.get(' 2016-W07-5' )
99- # <Arrow [2016-01-01T00:00:00+00:00]>
100-
101- pendulum.parse(' 2016-W07-5' )
102- # <Pendulum [2016-02-19T00:00:00+00:00]>
103-
104- # Working with DST
105- just_before = arrow.Arrow(2013 , 3 , 31 , 1 , 59 , 59 , 999999 , ' Europe/Paris' )
106- just_after = just_before.replace(microseconds = 1 )
107- ' 2013-03-31T02:00:00+02:00'
108- # Should be 2013-03-31T03:00:00+02:00
109-
110- (just_after.to(' utc' ) - just_before.to(' utc' )).total_seconds()
111- - 3599.999999
112- # Should be 1e-06
113-
114- just_before = pendulum.datetime(2013 , 3 , 31 , 1 , 59 , 59 , 999999 , ' Europe/Paris' )
115- just_after = just_before.add(microseconds = 1 )
116- ' 2013-03-31T03:00:00+02:00'
117-
118- (just_after.in_timezone(' utc' ) - just_before.in_timezone(' utc' )).total_seconds()
119- 1e-06
120-
121- Those are a few examples showing that Arrow cannot always be trusted to have a consistent
122- behavior with the data you are passing to it.
123-
124-
12577Limitations
12678===========
12779
@@ -186,7 +138,7 @@ Getting started
186138---------------
187139
188140To work on the Pendulum codebase, you'll want to clone the project locally
189- and install the required depedendencies via `poetry <https://poetry.eustace.io >`_.
141+ and install the required dependencies via `poetry <https://poetry.eustace.io >`_.
190142
191143.. code-block :: bash
192144
0 commit comments