On Jan 15, 2018, at 2:52 PM, John Wiegley <jwieg...@gmail.com> wrote: > >>>>>> "RN" == Rob Napier <robnap...@gmail.com> writes: > > RN> If I run that at the beginning of the quarter, that's three months, but > RN> near the end of the quarter it may only be one day. Is there a way to say > RN> the equivalent of: > > RN> ledger --forecast "d<[3 months from today]" ... > > Right now we don't define "time math", so there's no such notion as "today + 3 > months", although this really wouldn't be that hard to do. Until then, you > can use the power of the shell: > > ledger --forecast "d<[$(date --date='now + 3 months' +'%Y/%m/%d')]” >
Thanks a lot. That’s so obvious in retrospect that it’s a little embarrassing. Just what I needed. For anyone interested, here’s the whole alias I was building. It tells me if my checking account minus my credit cards is projected to be too low in the near future (including future periodic and budgeted items). The -v on date is because this is on a Mac, which doesn’t have the --date option. alias forecast='ledger --forecast "d<[$(date -v+90d +%Y/%m/%d)]" --display "d>today" --bold-if "total < 1000" reg Assets::Checking “Credit Cards"' -Rob -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.