aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws/core.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-05-21 21:54:11 +0300
committerFilipp Lepalaan <f@230.to>2013-05-21 21:54:11 +0300
commit6bcdd4ebaa0d04ff353602e3dbd8775c9ad76fdb (patch)
treece8a4df0f5675c5d2aaf3293cd87243292b962e3 /gsxws/core.py
parent5ffc41e3fa6000c2b9033a22ac0635bd6d3ae325 (diff)
downloadpy-gsxws-6bcdd4ebaa0d04ff353602e3dbd8775c9ad76fdb.tar.gz
py-gsxws-6bcdd4ebaa0d04ff353602e3dbd8775c9ad76fdb.tar.bz2
py-gsxws-6bcdd4ebaa0d04ff353602e3dbd8775c9ad76fdb.zip
Return native date instead of isoformat
Diffstat (limited to 'gsxws/core.py')
-rw-r--r--gsxws/core.py6
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):