From 1af0f66e73760615eae83d7ee0f2c0871516734d Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 25 Apr 2017 12:04:39 -0700 Subject: [PATCH] lib: timeclock test notes --- tests/timeclock/timeclock.test | 53 +++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/tests/timeclock/timeclock.test b/tests/timeclock/timeclock.test index 656dcfaa7..2fdd1fada 100644 --- a/tests/timeclock/timeclock.test +++ b/tests/timeclock/timeclock.test @@ -1,4 +1,4 @@ -# a timeclock session is parsed as a similarly-named transaction with one virtual posting +# 1. a timeclock session is parsed as a similarly-named transaction with one virtual posting hledger -f - print <<< i 2009/1/1 08:00:00 @@ -21,6 +21,57 @@ o 2009/1/3 09:00:00 >>>2 >>>= 0 +# TODO +# 2. multi-day sessions get a new transaction for each day +hledger -f- print +<<< +i 2017/04/20 09:00:00 A +o 2017/04/20 17:00:00 +i 2017/04/21 09:00:00 B +o 2017/04/21 17:00:00 +i 2017/04/22 09:00:00 C +o 2017/04/22 17:00:00 +>>> +>>>2 +>>>= + +# 3. unclosed sessions are automatically closed at report time +# TODO this output looks wrong +hledger -f- print +<<< +i 2017/04/20 09:00:00 A +o 2017/04/20 17:00:00 +i 2017/04/21 09:00:00 B +o 2017/04/21 17:00:00 +i 2017/04/22 09:00:00 C +o 2017/04/22 17:00:00 +>>> +2017/04/20 * 09:00-17:00 + (A) 8.00h + +2017/04/21 * 09:00-23:59 + (B) 15.00h + +2017/04/22 * 00:00-09:00 + (B) 9.00h + +2017/04/22 * 17:00-23:59 + () 7.00h + +2017/04/23 * 00:00-23:59 + () 24.00h + +2017/04/24 * 00:00-23:59 + () 24.00h + +2017/04/25 * 00:00-11:28 + () 11.47h + +>>>2 +>>>= + +# 4. + # ledger timeclock example from #ledger # ==== consulting.timeclock # ; Time log for consulting sideline