|
|
|
@ -122,8 +122,15 @@ class Formatters :
|
|
|
|
|
def suppress (self,value):
|
|
|
|
|
return 'N/A'
|
|
|
|
|
def date(self,value):
|
|
|
|
|
value = value if type(value) != list else "-".join(value)
|
|
|
|
|
if len(value) > 8 or '-' in value:
|
|
|
|
|
value = value.split('-')[0]
|
|
|
|
|
#
|
|
|
|
|
# This is the case of a thru date i.e the first part should be provided in a 435 entry
|
|
|
|
|
#
|
|
|
|
|
fdate = "-".join([value[:8][:4],value[:8][4:6],value[:8][6:8]])
|
|
|
|
|
tdate = "-".join([value[9:][:4],value[9:][4:6],value[9:][6:8]])
|
|
|
|
|
|
|
|
|
|
return {"from":fdate,"to":tdate}
|
|
|
|
|
|
|
|
|
|
if len(value) == 8 :
|
|
|
|
|
year = value[:4]
|
|
|
|
|