I'm trying to just see how much I spent eating out in the last week, and I'm a little stumped. I can use -W, but I don't care about previous weeks. I can use -b 2009/12/27, but then I have to calculate when "sunday" was. And '-b sunday' isn't doing what I expect:
(ldg is just a shell script that zcat's my gnucash file to stdout and then runs ledger -f -). mwri...@dunkel:~$ ldg -S d -b 2009/12/27 reg expenses:dining 2009/12/28 Chang Mai Thai Ro:Expenses:Dining $44.00 $44.00 2009/12/29 Balance Adjustment Ro:Expenses:Dining $67.00 $111.00 2009/12/30 Espresso Royale Ro:Expenses:Dining $3.00 $114.00 2009/12/31 Eli's Ro:Expenses:Dining $40.75 $154.75 2010/01/01 Cafe Barbette Ro:Expenses:Dining $25.00 $179.75 Why doesn't '-b sunday' work the way I expect? mwri...@dunkel:~$ ldg -S d -b sunday reg expenses:dining 2010/01/01 Cafe Barbette Ro:Expenses:Dining $25.00 $25.00 "last sunday" is even worse: mwri...@dunkel:~$ ldg -S d -b "last sunday" reg expenses:dining 2009/12/18 Balance Adjustment Ro:Expenses:Dining $7.50 $7.50 2009/12/18 French Meadow Ro:Expenses:Dining $33.00 $40.50 2009/12/20 Eli's Ro:Expenses:Dining $36.60 $77.10 2009/12/23 Eli's Ro:Expenses:Dining $65.85 $142.95 2009/12/23 Punch Ro:Expenses:Dining $18.00 $160.95 2009/12/23 Balance Adjustment Ro:Expenses:Dining $27.00 $187.95 2009/12/28 Chang Mai Thai Ro:Expenses:Dining $44.00 $231.95 2009/12/29 Balance Adjustment Ro:Expenses:Dining $67.00 $298.95 2009/12/30 Espresso Royale Ro:Expenses:Dining $3.00 $301.95 2009/12/31 Eli's Ro:Expenses:Dining $40.75 $342.70 2010/01/01 Cafe Barbette Ro:Expenses:Dining $25.00 $367.70
