myusuf3 / delorean

Delorean: Time Travel Made Easy
http://delorean.rtfd.org/
MIT License
1.84k stars 128 forks source link

Fix ISO date parsing #103

Closed orsinium closed 5 years ago

orsinium commented 5 years ago

Thank you for cool library.

In some of versions between 2.5 and 2.6 python-dateutil broke ISO date parsing when dayfirst=True. Unfortunately, delorean uses True for this parameter by default. So, I've fixed it:

  1. Try to parse string as ISO date before everything else.
  2. You can disable it via isofirst=False.
  3. Added test for this case.
  4. python-dateutil version constraint now >=2.7.0, because dateutil.parser.isoparse added only in this version.

Close #101

orsinium commented 5 years ago

@myusuf3, could you, please, review this PR?

myusuf3 commented 5 years ago

@orsinium thanks for the patch and the work.

orsinium commented 5 years ago

Thank you. I'm always happy to help good projects to be more stable and cool. Have a great day :)