Excellent work! I'm not sure if this is a bug or a "lack of a feature", but I would love to see the period flag (-p) accept "YYYY/MM". The sample file only has entries from 'May 2004', but using -p to request entries from 'April 2004' still shows the ones from May.
vi...@ike:~/dev/ledger$ ./ledger -f ./doc/sample.dat -p 2004/04 bal
expenses
$90.000 Expenses
$20.000 Books
$40.000 Cards
$30.000 Docs
--------------------
$90.000
