[imp] merge nested tests in _dttime_format.__str__
bzr revid: xmo@tinyerp.com-20100214144204-0ary7dqew73j3jmr
This commit is contained in:
parent
210ac606ae
commit
858cec547b
|
@ -119,11 +119,10 @@ class _dttime_format(str, _format):
|
||||||
self.val = value and str(value) or ''
|
self.val = value and str(value) or ''
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
if self.val:
|
if self.val and getattr(self,'name', None):
|
||||||
if getattr(self,'name', None):
|
return datetime.strptime(self.name, DHM_FORMAT)\
|
||||||
return datetime.strptime(self.name, DHM_FORMAT)\
|
.strftime("%s %s"%(self.lang_obj.date_format,
|
||||||
.strftime("%s %s"%(self.lang_obj.date_format,
|
self.lang_obj.time_format))
|
||||||
self.lang_obj.time_format))
|
|
||||||
return self.val
|
return self.val
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue