lib: reportSpan debug output

This commit is contained in:
Simon Michael 2018-03-30 02:41:03 +01:00
parent 939d6833ea
commit 2b34ff1184

View File

@ -418,12 +418,14 @@ tests_queryOptsFromOpts = [
-- Needs IO to parse smart dates in options/queries.
reportSpan :: Journal -> ReportOpts -> IO DateSpan
reportSpan j ropts = do
(mspecifiedstartdate, mspecifiedenddate) <- specifiedStartEndDates ropts
(mspecifiedstartdate, mspecifiedenddate) <-
dbg2 "specifieddates" <$> specifiedStartEndDates ropts
let
DateSpan mjournalstartdate mjournalenddate = journalDateSpan False j -- don't bother with secondary dates
DateSpan mjournalstartdate mjournalenddate =
dbg2 "journalspan" $ journalDateSpan False j -- don't bother with secondary dates
mstartdate = mspecifiedstartdate <|> mjournalstartdate
menddate = mspecifiedenddate <|> mjournalenddate
return $ DateSpan mstartdate menddate
return $ dbg1 "reportspan" $ DateSpan mstartdate menddate
reportStartDate :: Journal -> ReportOpts -> IO (Maybe Day)
reportStartDate j ropts = spanStart <$> reportSpan j ropts