diff options
author | Filipp Lepalaan <f@230.to> | 2013-05-21 21:54:11 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-05-21 21:54:11 +0300 |
commit | 6bcdd4ebaa0d04ff353602e3dbd8775c9ad76fdb (patch) | |
tree | ce8a4df0f5675c5d2aaf3293cd87243292b962e3 | |
parent | 5ffc41e3fa6000c2b9033a22ac0635bd6d3ae325 (diff) | |
download | py-gsxws-6bcdd4ebaa0d04ff353602e3dbd8775c9ad76fdb.tar.gz py-gsxws-6bcdd4ebaa0d04ff353602e3dbd8775c9ad76fdb.tar.bz2 py-gsxws-6bcdd4ebaa0d04ff353602e3dbd8775c9ad76fdb.zip |
Return native date instead of isoformat
-rw-r--r-- | gsxws/core.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gsxws/core.py b/gsxws/core.py index 73c2b29..d85c72a 100644 --- a/gsxws/core.py +++ b/gsxws/core.py @@ -394,15 +394,15 @@ class GsxObject(object): v = unicode(v) # "must be unicode, not str" - # convert dates to native Python type + # convert dates to native Python type ("mm/dd/yy") if re.search(r'^\d{2}/\d{2}/\d{2}$', v): m, d, y = v.split('/') - v = date(2000+int(y), int(m), int(d)).isoformat() + v = date(2000+int(y), int(m), int(d)) # seems that some dates are in the format "yyyy-mm-dd" if re.search(r'^\d{4}-\d{2}-\d{2}$', v): y, m, d = v.split('-') - v = date(int(y), int(m), int(d)).isoformat() + v = date(int(y), int(m), int(d)) # strip currency prefix and munge into float if re.search(r'Price$', k): |