Git Product home page Git Product logo

Comments (6)

myusuf3 avatar myusuf3 commented on August 28, 2024 2

I wont have time to look at this till monday, but I will fix it soon.

from delorean.

andremilk avatar andremilk commented on August 28, 2024

On the changelog for the python-dateutil==2.5.2 they say they fixed a bug regarding dayfirst and yearfirst.
https://github.com/dateutil/dateutil/blob/master/NEWS

dateutil/dateutil@2d42e04

Looking forward to know more about this.

from delorean.

andremilk avatar andremilk commented on August 28, 2024

I got an error of "ValueError: month must be in 1..12" from dateutil

File "/usr/local/lib/python2.7/site-packages/pynamodb/models.py", line 394, in refresh
self._deserialize(item_data)
File "/usr/local/lib/python2.7/site-packages/pynamodb/models.py", line 1142, in _deserialize
setattr(self, name, attr_instance.deserialize(value))
File "/usr/local/lib/python2.7/site-packages/pynamodb/attributes.py", line 260, in deserialize
print parse(value).datetime
File "/usr/local/lib/python2.7/site-packages/delorean/interface.py", line 68, in parse
dt = capture(datetime_str, dayfirst=dayfirst, yearfirst=yearfirst)
File "/usr/local/lib/python2.7/site-packages/dateutil/parser.py", line 1170, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/local/lib/python2.7/site-packages/dateutil/parser.py", line 580, in parse
ret = default.replace(**repl)
ValueError: month must be in 1..12
and repl = {u'hour': 22, u'month': 28, u'second': 20, u'microsecond': 600703, u'year': 2016, u'day': 3, u'minute': 38}

from delorean.

alan-unravel avatar alan-unravel commented on August 28, 2024

+1 on this

from delorean.

alan-unravel avatar alan-unravel commented on August 28, 2024

A quick fix for this to prevent breaks would be to set dayfirst's default value to False, also it is strange that they don't deal with yearfirst flag at all and ideally it should take priority since it was the default

from delorean.

ParthGandhi avatar ParthGandhi commented on August 28, 2024

Closing this as a duplicate of #87.

from delorean.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.