arrow
Pendulum
arrow | Pendulum | |
---|---|---|
1 | 11 | |
7,467 | 6,066 | |
- | - | |
8.0 | 7.3 | |
almost 3 years ago | about 1 month ago | |
Python | Python | |
Apache License 2.0 | 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.
arrow
-
Introduction to Flaky Tests by Example
Another way of doing so would be to inject the value directly to the method. Python has a very good library to sandbox the tests when using the built-in datetime objects: freezegun. Once again, and unfortunately for us, the project was using arrow so this was not a possibility.
Pendulum
-
Creating Command-Line Tools in Python with argparse - Guide
I did the same with datetime and moved to using 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/
-
đź—“ 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.
[0] https://github.com/sdispater/pendulum
-
We need a metric version of time.
You shouldn't do manual date and time calculations, there are people dedicated to developing tools for that and they're giving those tools for free! An example, Pendulum for Python.
-
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.
-
Python Datetime (with examples)
Bless you for using the stock library but Pendulum is a much more humane way to work with dates and times in Python.
-
What's the easiest / most efficient way to subtract 7 days from the current date?
Also, check the docs here if you're open to an alternative: https://pendulum.eustace.io/
- Date math: is there a faster / more pythonic / just all around better way to do this
-
Open-source Timezone Converter?
Use Pendulum. It makes converting, adding and subtracting times trivially simple.
What are some alternatives?
freezegun - Let your Python tests travel through time
arrow - 🏹 Better dates & times for Python
timezonefinder - python package for finding the timezone of any point on earth (coordinates) offline
pytz - pytz Python historical timezone library and database
pandas_market_calendars - Exchange calendars to use with pandas for trading applications
dateutil - Useful extensions to the standard Python datetime features
kevin-deldycke-blog - :notebook: My blog, based on Pelican.
Maya - Datetimes for Humans™
jalali-pandas - A pandas extension that solves all problems of Jalai/Iraninan/Shamsi dates
delorean - Delorean: Time Travel Made Easy
new-year-countdown-python - New Year Countdown with Python :)
when.py