hledger-lib-0.26: Core data types, parsers and utilities for the hledger accounting tool.

Safe Haskell | None
Language | Haskell2010

Hledger.Data.TimeLog

Description

A `TimeLogEntry` is a clock-in, clock-out, or other directive in a timelog file (see timeclock.el or the command-line version). These can be converted to `Transactions` and queried like a ledger.

Synopsis

- timeLogEntriesToTransactions :: LocalTime -> [TimeLogEntry] -> [Transaction]
- entryFromTimeLogInOut :: TimeLogEntry -> TimeLogEntry -> Transaction
- tests_Hledger_Data_TimeLog :: Test

# Documentation

timeLogEntriesToTransactions :: LocalTime -> [TimeLogEntry] -> [Transaction] Source

Convert time log entries to journal transactions. When there is no clockout, add one with the provided current time. Sessions crossing midnight are split into days to give accurate per-day totals.

entryFromTimeLogInOut :: TimeLogEntry -> TimeLogEntry -> Transaction Source

Convert a timelog clockin and clockout entry to an equivalent journal transaction, representing the time expenditure. Note this entry is not balanced, since we omit the "assets:time" transaction for simpler output.

tests_Hledger_Data_TimeLog :: Test Source