From 6bcdd4ebaa0d04ff353602e3dbd8775c9ad76fdb Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 21 May 2013 21:54:11 +0300 Subject: Return native date instead of isoformat --- gsxws/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gsxws/core.py') 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): -- cgit v1.2.3