mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-27 04:13:11 +03:00
Fix and update documentation on date options
This commit is contained in:
parent
e483faf7f0
commit
2b01312004
@ -138,7 +138,7 @@ m4_define({{_reportingoptions_}}, {{
|
|||||||
: multiperiod/multicolumn report by year
|
: multiperiod/multicolumn report by year
|
||||||
|
|
||||||
`-p --period=PERIODEXP`
|
`-p --period=PERIODEXP`
|
||||||
: set start date, end date, and/or reporting interval all at once using [period expressions](manual.html#period-expressions) syntax (overrides the flags above)
|
: set start date, end date, and/or reporting interval all at once using [period expressions](manual.html#period-expressions) syntax
|
||||||
|
|
||||||
`--date2`
|
`--date2`
|
||||||
: match the secondary date instead (see command help for other effects)
|
: match the secondary date instead (see command help for other effects)
|
||||||
|
@ -141,7 +141,7 @@ reportflags = [
|
|||||||
,flagNone ["monthly","M"] (setboolopt "monthly") "multiperiod/multicolumn report by month"
|
,flagNone ["monthly","M"] (setboolopt "monthly") "multiperiod/multicolumn report by month"
|
||||||
,flagNone ["quarterly","Q"] (setboolopt "quarterly") "multiperiod/multicolumn report by quarter"
|
,flagNone ["quarterly","Q"] (setboolopt "quarterly") "multiperiod/multicolumn report by quarter"
|
||||||
,flagNone ["yearly","Y"] (setboolopt "yearly") "multiperiod/multicolumn report by year"
|
,flagNone ["yearly","Y"] (setboolopt "yearly") "multiperiod/multicolumn report by year"
|
||||||
,flagReq ["period","p"] (\s opts -> Right $ setopt "period" s opts) "PERIODEXP" "set start date, end date, and/or report interval all at once (overrides the flags above)"
|
,flagReq ["period","p"] (\s opts -> Right $ setopt "period" s opts) "PERIODEXP" "set start date, end date, and/or report interval all at once"
|
||||||
,flagNone ["date2"] (setboolopt "date2") "match the secondary date instead. See command help for other effects. (--effective, --aux-date also accepted)" -- see also hiddenflags
|
,flagNone ["date2"] (setboolopt "date2") "match the secondary date instead. See command help for other effects. (--effective, --aux-date also accepted)" -- see also hiddenflags
|
||||||
|
|
||||||
-- status/realness/depth/zero filters
|
-- status/realness/depth/zero filters
|
||||||
|
@ -234,8 +234,18 @@ You can specify a start and/or end date using
|
|||||||
[`-p/--period`](#period-expressions)
|
[`-p/--period`](#period-expressions)
|
||||||
or a [`date:` query](#queries) (described below).
|
or a [`date:` query](#queries) (described below).
|
||||||
All of these accept the [smart date](#smart-dates) syntax.
|
All of these accept the [smart date](#smart-dates) syntax.
|
||||||
One important thing to be aware of when specifying end dates: as in Ledger, end dates are exclusive,
|
|
||||||
so you need to write the date *after* the last day you want to include.
|
Some notes:
|
||||||
|
|
||||||
|
- As in Ledger, end dates are exclusive, so you need to write the date *after*
|
||||||
|
the last day you want to include.
|
||||||
|
- As noted in [reporting options](#general-options):
|
||||||
|
among start/end dates specified with *options*, the last (i.e. right-most)
|
||||||
|
option takes precedence.
|
||||||
|
- The effective report start and end dates are the intersection of the
|
||||||
|
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
|
||||||
|
smallest common time span.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
@ -258,7 +268,7 @@ reports into multiple subperiods. The basic intervals can be
|
|||||||
selected with one of `-D/--daily`, `-W/--weekly`, `-M/--monthly`,
|
selected with one of `-D/--daily`, `-W/--weekly`, `-M/--monthly`,
|
||||||
`-Q/--quarterly`, or `-Y/--yearly`. More complex intervals may be
|
`-Q/--quarterly`, or `-Y/--yearly`. More complex intervals may be
|
||||||
specified with a [period expression](#period-expressions).
|
specified with a [period expression](#period-expressions).
|
||||||
Report intervals can not be specified with a [query](#queries), currently.
|
Report intervals can not be specified with a [query](#queries).
|
||||||
|
|
||||||
## Period expressions
|
## Period expressions
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user