dateutil
Pendulum
Our great sponsors
dateutil | Pendulum | |
---|---|---|
3 | 11 | |
2,242 | 6,050 | |
1.2% | - | |
6.0 | 7.3 | |
about 1 month ago | 27 days ago | |
Python | Python | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dateutil
We haven't tracked posts mentioning dateutil yet.
Tracking mentions began in Dec 2020.
Pendulum
-
It's Time for a Change: Datetime.utcnow() Is Now Deprecated
Python could be better but really, does any language handle date and time types well? After 30+ years of this I mostly just use seconds since epoch everywhere like some sort of caveman banging rocks together. But at least it works clearly.
Last I looked Pendulum was the best choice for a fancy but humane Python library for dates and times. Install size is over 4MB :-( https://pendulum.eustace.io/
The snippets the article give are good to get an UTC datetime or timestamp now.
I'd like to add that if you have any fancy datetime manipulation to do in Python, pendulum (https://pendulum.eustace.io/) is probably your best bet.
-
đź—“ date-operations: A package for common date operations [Package on PyPy]
Good luck with your library, but for everyone else I’ll leave this here: https://pendulum.eustace.io/
-
Pytz: The Fastest Footgun in the West
Pendulum is quite good[0]. Relatively intuitive interface.
When I left Rails, this is one area I really missed.
Time.use_zone("Singapore") { (Time.zone.now - 3.days).beginning_of_week }
This readable line in datetime utils or even pendulum, is such a pain.
-
Stop Using Utcnow and Utcfromtimestamp
Yes, the datetime api once timezone is involved is quite bad in python.
This is why for anything that uses timezone, I use pendulum: https://pendulum.eustace.io/
It's compatible with the datetime api, but it has sane default, nice tools to convert between timezone, some cool date adjustment stuff, and can humanize time in several languages.
Basically, datetime has the same problem as text vs raw bytes in python 2.7, except it has never been fixed.
-
Open-source Timezone Converter?
Use Pendulum. It makes converting, adding and subtracting times trivially simple.
What are some alternatives?
arrow - 🏹 Better dates & times for Python
pytz - pytz Python historical timezone library and database
Maya - Datetimes for Humans™
moment - A Python library for dealing with dates
delorean - Delorean: Time Travel Made Easy
PyTime - PyTime is an easy-use Python module which aims to operate date/time/datetime by string.
when.py