;doc: clarify report intervals' effect on begin/end dates (#1561)

This commit is contained in:
Simon Michael 2021-05-18 10:49:05 -10:00
parent 0727736bff
commit 031219e792
3 changed files with 8 additions and 2 deletions

View File

@ -103,9 +103,11 @@ m4_define({{_reportingoptions_}}, {{
`-b --begin=DATE` `-b --begin=DATE`
: include postings/txns on or after this date : include postings/txns on or after this date
(will be adjusted to preceding subperiod start when using a report interval)
`-e --end=DATE` `-e --end=DATE`
: include postings/txns before this date : include postings/txns before this date
(will be adjusted to following subperiod end when using a report interval)
`-D --daily` `-D --daily`
: multiperiod/multicolumn report by day : multiperiod/multicolumn report by day

View File

@ -136,8 +136,8 @@ reportflags :: [Flag RawOpts]
reportflags = [ reportflags = [
-- report period & interval -- report period & interval
flagReq ["begin","b"] (\s opts -> Right $ setopt "begin" s opts) "DATE" "include postings/txns on or after this date" flagReq ["begin","b"] (\s opts -> Right $ setopt "begin" s opts) "DATE" "include postings/txns on or after this date (will be adjusted to preceding subperiod start when using a report interval)"
,flagReq ["end","e"] (\s opts -> Right $ setopt "end" s opts) "DATE" "include postings/txns before this date" ,flagReq ["end","e"] (\s opts -> Right $ setopt "end" s opts) "DATE" "include postings/txns before this date (will be adjusted to following subperiod end when using a report interval)"
,flagNone ["daily","D"] (setboolopt "daily") "multiperiod/multicolumn report by day" ,flagNone ["daily","D"] (setboolopt "daily") "multiperiod/multicolumn report by day"
,flagNone ["weekly","W"] (setboolopt "weekly") "multiperiod/multicolumn report by week" ,flagNone ["weekly","W"] (setboolopt "weekly") "multiperiod/multicolumn report by week"
,flagNone ["monthly","M"] (setboolopt "monthly") "multiperiod/multicolumn report by month" ,flagNone ["monthly","M"] (setboolopt "monthly") "multiperiod/multicolumn report by month"

View File

@ -493,6 +493,8 @@ Some notes:
start/end dates from options and that from `date:` queries. start/end dates from options and that from `date:` queries.
That is, `date:2019-01 date:2019 -p'2000 to 2030'` yields January 2019, the That is, `date:2019-01 date:2019 -p'2000 to 2030'` yields January 2019, the
smallest common time span. smallest common time span.
- A [report interval](#report-intervals) (see below) will adjust start/end dates,
when needed, so that they fall on subperiod boundaries.
Examples: Examples:
@ -743,6 +745,8 @@ or `hledger print cur:\\$`.
PERIODEXPR is a [period expression](#period-expressions) (with no report interval). PERIODEXPR is a [period expression](#period-expressions) (with no report interval).
Examples: `date:2016`, `date:thismonth`, `date:2000/2/1-2/15`, `date:lastweek-`. Examples: `date:2016`, `date:thismonth`, `date:2000/2/1-2/15`, `date:lastweek-`.
If the `--date2` command line flag is present, this matches [secondary dates](#secondary-dates) instead. If the `--date2` command line flag is present, this matches [secondary dates](#secondary-dates) instead.
([Report intervals](#report-intervals) will adjust [start/end dates](report-start--end-date)
to preceding/following subperiod boundaries.)
**`date2:PERIODEXPR`** **`date2:PERIODEXPR`**
: match secondary dates within the specified period. : match secondary dates within the specified period.