2 ms·
I am an amateur programmer who started with Python some 10 years ago. I had two revelations when it comes to modules: - requests - arrow Dates in Python are
by BrandoElFollito 6y ago
I am an amateur programmer who started with Python some 10 years ago. I had two revelations when it comes to modules:
- requests
- arrow
Dates in Python are so fucked up that it is beyond imagination. I understand that there are philosophical reasons for that but I do not care. I need to compare dates, add dates, do sometime < now < someothertime, etc.
All this without a PhD in Time Pythonlology.
When I discovered arrow I fell in love and now I use it for anything. Need to output an ISO date? arrow. Need to output a timestamp? arrow. Need to compare two dates? arrow. arrow. arrow.
Yes, this is a hammer for any date nail *but it works*.
There are some great programs (such as Borg) that were hit by the monstruosities in pythin dates and eneded up with some half-baked semi-ISO output without timezones. Has the author used arrow by default he would not have gone wrong.
The main dev is great and a bit stubborn (he closed a Very important Issue Of Mine and I had to fix it myself :/) but I will be forever admirative about his work (and the work of other contributors).
I am waiting now for the next announce about requests.
EDIT: I also tried pendulum and delorean but always ended up back with arrow. I now need to understand how to move from moment.js to luxon.js and my life with dates will be complete.