mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 07:09:28 +03:00
slightly simplify time arithmetic
This commit is contained in:
parent
ea41778948
commit
fbe0faa1aa
@ -56,7 +56,7 @@ entryFromTimeLogInOut i o =
|
||||
outdate = showDateFrom outtime
|
||||
intime = parsedatetime $ tldatetime i
|
||||
outtime = parsedatetime $ tldatetime o
|
||||
hours = fromRational (toRational (diffUTCTime outtime intime) / 3600) -- whatever..
|
||||
hours = realToFrac (diffUTCTime outtime intime) / 3600
|
||||
amount = Amount (getcurrency "h") hours 1
|
||||
txns = [RawTransaction acctname amount "", RawTransaction "assets:TIME" (-amount) ""]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user