Skip to content

1.25: "every nth day of month" calculating wrong dates with certain forecast start dates #2032

Closed

Description

@simonmichael

I found a fairly obscure regression with forecast dates in 1.25:

~ every 31st day of month
    (a)  1

Here, 1.24 correctly approximates the 31st day of each month:

$ hledger-1.24 -f a.j reg --forecast=202303..
2023-03-31                      (a)                              1             1
2023-04-30                      (a)                              1             2
2023-05-31                      (a)                              1             3
2023-06-30                      (a)                              1             4
2023-07-31                      (a)                              1             5
2023-08-31                      (a)                              1             6
2023-09-30                      (a)                              1             7

But 1.25 gets confused by the forecast start date and calculates wrong dates:

$ hledger-1.25 -f a.j reg --forecast=202303..
2023-03-28                      (a)                              1             1
2023-04-28                      (a)                              1             2
2023-05-28                      (a)                              1             3
2023-06-28                      (a)                              1             4
2023-07-28                      (a)                              1             5
2023-08-28                      (a)                              1             6
2023-09-28                      (a)                              1             7
2023-10-28                      (a)                              1             8

Activity

  1. added
    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.
    journalThe journal file format, and its features.
    period-expressionsPeriod expressions, used in queries, periodic rules, etc.
    regressionA backwards step, indicating a weakness in our QA. We don't like these.
    on May 4, 2023
  2. changed the title [-]"every nth day of month" calculating wrong forecast dates near end of month (since 1.25)[/-] [+]"every nth day of month" calculating wrong dates with a forecast start date (since 1.25)[/+] on May 4, 2023
  3. changed the title [-]"every nth day of month" calculating wrong dates with a forecast start date (since 1.25)[/-] [+]"every nth day of month" calculating wrong dates with certain forecast start dates (since 1.25)[/+] on May 4, 2023
  4. added a commit that references this issue on May 4, 2023
    75a6c1e
  5. changed the title [-]"every nth day of month" calculating wrong dates with certain forecast start dates (since 1.25)[/-] [+]1.25: "every nth day of month" calculating wrong dates with certain forecast start dates[/+] on Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.bountyThar's some kind o' loot on offer..journalThe journal file format, and its features.period-expressionsPeriod expressions, used in queries, periodic rules, etc.regressionA backwards step, indicating a weakness in our QA. We don't like these.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions