Permalink
Browse files

convert to dates

  • Loading branch information...
1 parent 9edbc5a commit 5ad4b8e66c6964d627bdc53a37d6fc5d9a90d0a7 @tlevine committed Jun 16, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 reader/src/finalip_lib.py
@@ -1,9 +1,12 @@
#!/usr/bin/env python2
+import datetime
from collections import OrderedDict
def parse_row(tr):
row = OrderedDict([(unicode(td.xpath('@headers')[0]), unicode(td.text_content())) for td in tr.xpath('td[@headers!="Map"]')])
row[u'Map'] = unicode(tr.xpath('descendant::td[@headers="Map"]/a/@href')[0])
+ for key in [u'Date Issued\\Denied', u'Public Notice Date']:
+ row[key] = datetime.datetime.strptime(row[key], '%d-%b-%Y').date()
return row

0 comments on commit 5ad4b8e

Please sign in to comment.