Rename variable

This commit is contained in:
Martin Puppe 2017-10-31 18:02:27 +01:00
parent d6c1aac461
commit a748cff082

View file

@ -74,18 +74,18 @@ function RefreshAccount (account, since)
local children = row:children() local children = row:children()
local pattern = '(%d%d)%.(%d%d)%.(%d%d%d%d)' local pattern = '(%d%d)%.(%d%d)%.(%d%d%d%d)'
local day, month, year = children:get(1):text():match(pattern) local day, month, year = children:get(1):text():match(pattern)
local valueTime = os.time{day=day, month=month, year=year} local bookingDate = os.time{day=day, month=month, year=year}
if valueTime < since then if bookingDate < since then
print('Stopping parsing because transaction is too old.') print('Stopping parsing because transaction is too old.')
print('Date of transaction: ' .. os.date('%c', valueTime)) print('Date of transaction: ' .. os.date('%c', bookingDate))
print('since: ' .. os.date('%c', since)) print('since: ' .. os.date('%c', since))
break break
end end
local amount = ParseAmount(children:get(3):text()) local amount = ParseAmount(children:get(3):text())
table.insert(transactions, { table.insert(transactions, {
bookingDate = valueTime, bookingDate = bookingDate,
amount = amount amount = amount
}) })
end end