Comments (6)
I wont have time to look at this till monday, but I will fix it soon.
from delorean.
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
Looking forward to know more about this.
from delorean.
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.
+1 on this
from delorean.
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.
Closing this as a duplicate of #87.
from delorean.
Related Issues (20)
- Pip package is not updated HOT 2
- parse function does not parse date string correctly
- Publish New Version HOT 5
- Language support HOT 1
- Fix simple typo: specificed -> specified
- mistake in parse example HOT 1
- zoneinfo.ZoneInfo AttributeError while parsing within the Django context HOT 1
- mock requirement could be optional
- PytzUsageWarning "normalize method is no longer necessary" when using delorean.parse()
- #118
- Issue with tzlocal==5.0
- Fix midnight() and naive() references on Quickstart page HOT 2
- Strict ISO 8601 parser HOT 1
- Add a wrapper for babel's parse_pattern() HOT 2
- Delorean.now() accepts timezone while delorean.now() does not
- parser failling in RFC3339 format HOT 1
- delorean.dates.UTC is gone in 0.6.0
- Some kind of time delta for localized "business days"
- Delorean.shift does not take datetime.timezone.utc HOT 3
- stops() skips february??? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delorean.