store transactions dates as datetime.date objects
This commit is contained in:
parent
94f7941a84
commit
679177d450
1 changed files with 7 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2010-2011 Nicolas Duhamel
|
||||
# Copyright(C) 2010-2012 Nicolas Duhamel
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
@ -18,6 +18,7 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from datetime import date
|
||||
import re
|
||||
|
||||
from weboob.capabilities.bank import Transaction
|
||||
|
|
@ -37,9 +38,12 @@ class AccountHistory(BasePage):
|
|||
|
||||
for mvt in mvt_ligne:
|
||||
operation = Transaction(len(operations))
|
||||
operation.date = mvt.xpath("./td/span")[0].text
|
||||
|
||||
d = mvt.xpath("./td/span")[0].text.strip().split('/')
|
||||
operation.date = date(*reversed([int(x) for x in d]))
|
||||
|
||||
tmp = mvt.xpath("./td/span")[1]
|
||||
operation.raw = unicode(self.parser.tocleanstring(tmp))
|
||||
operation.raw = unicode(self.parser.tocleanstring(tmp).strip())
|
||||
|
||||
r = re.compile(r'\d+')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue