Re: more intuitive forecast behaviour when there are no ordinary transactions ? (#1648)

12 views
Skip to first unread message

Simon Michael

unread,
Aug 8, 2021, 3:45:46 PM8/8/21
to hledger
ideas welcome from any --forecast users.


On Aug 8, 2021, at 8:26 AM, Simon Michael <notifi...@github.com> wrote:

Reviewing #1538, I expected this to show some forecasted transactions, even without specifying an explicit --forecast=PERIOD, because there are no ordinary transactions that would suppress them:

~ every friday
    (foo)                                          1.00 USD
$ hledger reg --forecast -b 2021/4/1 -e 2021/5/1

It took me two careful readings of the forecast period doc (hledger help forecast) to understand why it doesn't (forecast start date was defaulting to today):

Periodic transactions are generated within some forecast period. By default, this

  • begins on the later of
    • the report start date if specified with -b/-p/date:
    • the day after the latest normal (non-periodic) transaction in
      the journal, or today if there are no normal transactions.

Wouldn't it would be more intuitive to show some transactions in the above case ? The rule could be:

  • if there are normal transactions in the journal
    • begins on the later of
      • the day after the latest normal transaction
      • the report start date if specified
  • if there are no normal transactions in the journal
    • begins on the report start date if specified, otherwise today

I think it is backward compatible and the user-visible behaviour is strictly more intuitive. However it now looks even more complicated. I wonder

  • Is there a simpler way to describe it ?
  • Is there a simpler rule that would be worth changing to ?

Reply all
Reply to author
Forward
0 new messages