@@ -4689,38 +4689,24 @@ The following standard intervals can be enabled with command-line flags:
4689
4689
4690
4690
More complex intervals can be specified using ` -p/--period ` , described below.
4691
4691
4692
- ## Date adjustment
4692
+ ## Start date adjustment
4693
4693
4694
- When there is a report interval (other than daily), report start/end dates
4695
- which have been inferred, eg from the journal, are automatically adjusted to
4696
- natural period boundaries. This is convenient for producing simple periodic reports.
4697
- More precisely:
4694
+ When there is a report interval (other than daily), a "soft" report start date -
4695
+ ie one which was not specified explicitly, but inferred, perhaps from the journal -
4696
+ will be adjusted earlier if needed to start on a natural period boundary.
4698
4697
4699
- - an inferred start date will be adjusted earlier if needed to fall on a
4700
- natural period boundary
4698
+ A "hard" report date - one specified explicitly, eg by ` -b ` - will not be adjusted
4699
+ (since hledger 1.29).
4700
+ This makes it possible to start subperiods on any date.
4701
+ Note if you specify a start date, it's ideal to set it to a period boundary
4702
+ (eg a monday for weekly reports, a first day of month for monthly reports..),
4703
+ as this will generate simple period headings; otherwise they will be more verbose.
4701
4704
4702
- - an inferred end date will be adjusted later if needed to make the last period
4703
- the same length as the others.
4705
+ ## End date adjustment
4704
4706
4705
- By contrast, start/end dates which have been specified explicitly,
4706
- with ` -b ` , ` -e ` , ` -p ` or ` date: ` , will not be adjusted (since hledger 1.29).
4707
- This makes it possible to specify non-standard report periods, but it also means
4708
- that if you are specifying a start date, you should pick one that's on a period boundary
4709
- if you want to see simple report period headings.
4710
-
4711
- <!--
4712
- An example: with a journal whose first date is 2023-01-10 and last date is 2023-03-20:
4713
-
4714
- - `hledger bal -M -b 2023/1/15 -e 2023/3/10`\
4715
- The report periods will begin on the 15th day of each month, starting from 2023-01-15,
4716
- and the last period's last day will be 2023-03-09.
4717
- (Exact start and end dates, neither is adjusted.)
4718
-
4719
- - `hledger bal -M -b 2023-01 -e 2023-04` or `hledger bal -M`\
4720
- The report periods will begin on the 1st of each month, starting from 2023-01-01,
4721
- and the last period's last day will be 2023-03-31.
4722
- (Flexible start and end dates, both are adjusted.)
4723
- -->
4707
+ The report end date (even if specified explicitly) will be adjusted later
4708
+ as needed to enclose a whole number of report intervals.
4709
+ Eg in a ` --yearly ` report, all subperiods will be one year long.
4724
4710
4725
4711
## Period expressions
4726
4712
0 commit comments