Skip to content

fix: use date2 when --date2 is present for reg --csv #2425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jneubrand
Copy link
Contributor

fixes #1206

draft: haven't verified that this…

  • handles html/ods output correctly
  • handles row sorting correctly

@simonmichael
Copy link
Owner

Forgive this off the cuff reaction, but it’s this: secondary dates were a mistake and I’d rather not have them consume any more time and attention…

@jneubrand
Copy link
Contributor Author

jneubrand commented Jul 7, 2025

I can survive adding this to the list of stuff I'm maintaining in here, I suppose ;)

It'd be nice to have consistency between areg & reg in this regard, though.

Thoughts on date2

I saw the "use posting dates instead" suggestion on hledger.org, but it doesn't really address the transaction/post date divide I want to keep track of. That is: a transaction can occur on Monday, but arrive at my bank on Tuesday and post on Wednesday. The bank provides me with two different dates in CSV columns (that I put into date/date2), and a third (POS-system-reported) date+time can be given via a text field (which is then piped into the Expense posting date tag).

With inter-bank transfers, there can be cases where a single transaction with two postings needs four different associated dates which are both "interesting" for different purposes (available balance, balance reported on bank statement, assertions, …). I guess I just don't want to use another tag to keep track of this, so I've been sticking to date2.

edit: oh, and the posting date can be before or after the transaction date at my bank ^^

@simonmichael
Copy link
Owner

simonmichael commented Jul 9, 2025

Ok; I'll merge this when ready. Consistency is good.

Generally, the use case seems a bit niche. There's no real limit to the number of dates someone might want to track; they'll probably need to use tags no matter what.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Q: is there a way to have date2 displayed in the hledger reg --output=csv export
2 participants