pgr0ss
Joined 16 years ago
Karma
676
Submissions
85
Member since
Feb 2
http://www.pgrs.net/
View on Hacker NewsJoined 16 years ago
This depends on how you implement the ledger. For pgledger, I store the balance in every entry, so to find a historical balance, you just need to find the most recent entry before that time:
https://github.com/pgr0ss/pgledger/blob/df5541dcf25f416a6a24...
I have a mental TODO to add a query function to make this simpler.