How do period expressions work with --begin and --end?

18 views
Skip to first unread message

Marcin Borkowski

unread,
Feb 1, 2023, 2:32:39 AM2/1/23
to Ledger
Hi all,

I was wondering how things like "this month" work with --begin and
--end. I did some experiments, and it looks like you can give "this
month" or "last month" as an argument to --begin and --end, and their
meaning is "the first day of that period". So:

--begin "last month" --end "this month"

is apparently equivalent to

--period "last month"

Is that correct? Also, is it documented somewhere?

Best,

--
Marcin Borkowski
http://mbork.pl

John Wiegley

unread,
Feb 3, 2023, 1:42:51 PM2/3/23
to Marcin Borkowski, Ledger
>>>>> "MB" == Marcin Borkowski <mb...@mbork.pl> writes:

MB> Is that correct? Also, is it documented somewhere?

Try the "ledger period EXPR" command, which will tell you how Ledger
interprets any given date expression. Not sure if this debugging subcommand is
documented...

John
Reply all
Reply to author
Forward
0 new messages