slightly simplify time arithmetic

This commit is contained in:
Simon Michael 2008-10-09 07:07:48 +00:00
parent ea41778948
commit fbe0faa1aa

View File

@ -56,7 +56,7 @@ entryFromTimeLogInOut i o =
outdate = showDateFrom outtime outdate = showDateFrom outtime
intime = parsedatetime $ tldatetime i intime = parsedatetime $ tldatetime i
outtime = parsedatetime $ tldatetime o outtime = parsedatetime $ tldatetime o
hours = fromRational (toRational (diffUTCTime outtime intime) / 3600) -- whatever.. hours = realToFrac (diffUTCTime outtime intime) / 3600
amount = Amount (getcurrency "h") hours 1 amount = Amount (getcurrency "h") hours 1
txns = [RawTransaction acctname amount "", RawTransaction "assets:TIME" (-amount) ""] txns = [RawTransaction acctname amount "", RawTransaction "assets:TIME" (-amount) ""]