hledger icon indicating copy to clipboard operation
hledger copied to clipboard

print --forecast generating an unexpected date

Open simonmichael opened this issue 2 years ago • 2 comments

From a report on the mail list:

~ every 16th day of month from 2023-03 to 2024-03
    (asset:cash)        1
$ hledger-1.28 print  --forecast=2023-02   # Should print nothing ?
2023-02-16
    ; generated-transaction: ~ every 16th day of month from 2023-03 to 2024-03
    (asset:cash)               1

simonmichael avatar Jan 19 '23 05:01 simonmichael

splitSpan seems to be doing something odd with adjusting the start date here: https://github.com/simonmichael/hledger/blob/1.28/hledger-lib/Hledger/Data/PeriodicTransaction.hs#L253 Debug output: ptspan: DateSpan 2023-03-01..2024-02-29 requestedspan: DateSpan 2023-02 alltxnspans: [ DateSpan 2023-02-16..2023-03-15, DateSpan 2023-03-16..2023-04-15, DateSpan 2023-04-16..2023-05-15, DateSpan 2023-05-16..2023-06-15, DateSpan 2023-06-16..2023-07-15, DateSpan 2023-07-16..2023-08-15, DateSpan 2023-08-16..2023-09-15, DateSpan 2023-09-16..2023-10-15, DateSpan 2023-10-16..2023-11-15, DateSpan 2023-11-16..2023-12-15, DateSpan 2023-12-16..2024-01-15, DateSpan 2024-01-16..2024-02-15, DateSpan 2024-02-16..2024-03-15 ]

simonmichael avatar Jan 19 '23 05:01 simonmichael

  • Clarify semantics of periods specified on command line + periods specified in periodic rule
  • Possibly some connection with #2032

simonmichael avatar May 04 '23 01:05 simonmichael