Balance comparing date with date/time

12 views
Skip to first unread message

Paulo Flabiano Smorigo

unread,
Apr 11, 2023, 7:39:18 PM4/11/23
to ledge...@googlegroups.com
If I pass a date in --display to register command, like below, it works fine.

$ ledger reg -d "d>=[2023-04-01] and d<[2023-05-01]

If I use the same argument with the balance command, it fails:

$ ledger bal -d "d>=[2023-04-01] and d<[2023-05-01]"
While evaluating value expression:
((d >= [2023-04-01]) & (d < [2023-05-01]))
^^^^^^^^^^^^^^^^^^^
While comparing if 2023/04/11 20:34:59 is less than 2023-04-01:

Is this expected or is it a bug?

--
P. F. Smorigo

John Wiegley

unread,
Apr 12, 2023, 12:47:28 AM4/12/23
to Paulo Flabiano Smorigo, ledge...@googlegroups.com
>>>>> "PFS" == Paulo Flabiano Smorigo <pfsm...@gmail.com> writes:

PFS> If I pass a date in --display to register command, like below, it works
PFS> fine. $ ledger reg -d "d>=[2023-04-01] and d<[2023-05-01]

PFS> If I use the same argument with the balance command, it fails:

PFS> $ ledger bal -d "d>=[2023-04-01] and d<[2023-05-01]"
PFS> While evaluating value expression:
PFS> ((d >= [2023-04-01]) & (d < [2023-05-01]))
PFS> ^^^^^^^^^^^^^^^^^^^
PFS> While comparing if 2023/04/11 20:34:59 is less than 2023-04-01:

PFS> Is this expected or is it a bug?

This sounds like a bug to me.

John
Reply all
Reply to author
Forward
0 new messages