fix: use date2 when --date2 is present for reg --csv
fixes #1206
draft: haven't verified that this…
- handles html/ods output correctly
- handles row sorting correctly
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…
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 ^^
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.