>>>>> Jesse Rosenthal <[email protected]> writes:

> I seem to have come across a bug in querying value expressions --
> something that works with `register' but fails with `balance':

>     ledger reg -l "d>=[this month]  => works
>     ledger reg -d "d>=[this month]  => works
>     ledger bal -l "d>=[this month]  => works
>     ledger bal -d "d>=[this month]  => FAILS with

>     While evaluating value expression:
>       (d >= [2012/08/01])
>       ^^^^^^^^^^^^^^^^^^^
>     While comparing if 2012/08/09 15:25:59 is less than 2012/08/01:
>     Error: Cannot compare a date/time to a date

It means that "date" doesn't have the meaning you think when applied to an
ACCOUNT.  With the other three invocations, you were applying date to a
POSTING.

I could perhaps make account.date mean "the date of the latest posting
contained in the account which matched the limiting predicate".  Would that
help?  I agree that there should be consistency between those four commands.

John

Reply via email to