hledger-interest icon indicating copy to clipboard operation
hledger-interest copied to clipboard

Support --until=DATE besides --today

Open basvandijk opened this issue 2 years ago • 2 comments

Hey @peti, I'm using your hledger-interest tool and it's great!

Sometimes I would like to generate interest transactions for the previous month and have them dated on the last day of the month. However when I'm already in the new month the --today option generates a transaction for the current day which is too late.

For this situation it would be nice to have a --until=DATE option which works the same as --today instead that you can specify the date.

WDYT?

basvandijk avatar Feb 01 '23 22:02 basvandijk

This would be a most welcome enhancement. I look forward to having it available to me. Meanwhile there could be a hack available if only I could get it to work. The --annual-schedule option could be used to set interest to zero at the end of the previous month. However, unless there is a balance change the interest calculation percentage change is ignored. This is a bug #20 , of course.

psb777 avatar Feb 25 '23 14:02 psb777

Great work @basvandijk! I don't have quite the same use case is, but I wanted to forecast my overall assets (e.g. using expected ROI of money market, equities etc). I was going to fork the repo to support arbitrary future end dates, but your feature fits the requirements perfectly.

bharathcs avatar Aug 03 '23 04:08 bharathcs