You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The journal file (pointed by $LEDGER_FILE) contains a default year directive: Y2021.
Yet when I enter the transaction date without the year (e.g. "11-03"), but in the future (because reasons), the year suggestion is 2020; the heuristics for year suggestion goes astray. Is there a an additional configuration step for default year - to bypass that heuristics - that I missed?
Cheers!
$ hledger-iadd --version This is hledger-iadd version 1.3.14
The text was updated successfully, but these errors were encountered:
Yes, iadd currently ignores the default year set in the journal. The year that's suggested is based on the current date and the (incomplete) entered date. The assumption is that iadd is mostly used to record past transactions and so it will helpfully suggest the most recent matching date from the past.
I don't know how to best accommodate your use-case without breaking mine, as I exclusively enter past transactions and the current behavior is quite helpful for that. Maybe the default year could indeed be used if set, but I have a feeling that this would somewhat conflate two concepts that ought to be separate: The in-journal date format and the completion mechanism.
Thanks for clarifications! Indeed, current heuristics works perfectly well if we input only past transactions.
I wonder if we could a separate directive - something like {%Y}, for example - that would force current year or default year in the date suggestion. Admittedly, that's a non-zero effort for a minor gain, I will not insist on implementing this feature=)
Hi!
My muscle memory prefers dates in the 2021-12-31 or 12-31 format, and I am running
hledger-iadd
as follows:$ hledger-iadd --completion-engine fuzzy --date-format '[%Y-]%m-%d'
The journal file (pointed by
$LEDGER_FILE
) contains a default year directive:Y2021
.Yet when I enter the transaction date without the year (e.g. "11-03"), but in the future (because reasons), the year suggestion is 2020; the heuristics for year suggestion goes astray. Is there a an additional configuration step for default year - to bypass that heuristics - that I missed?
Cheers!
The text was updated successfully, but these errors were encountered: