On 3/1/15 3:42 AM, santaph...@gmail.com wrote:
> Running
>    
>     ledger  -M --empty reg ^Expenses:RareExpense
> 
> produces a summary of Expenses:RareExpense, where each month is 
> represented, even if there was no activity for a given month.
> The behaviour of --empty with regards to the beginning and end of the 
> considered period surprises me, however.
> 
> First of all, the above does not include the no-activity months after the 
> last activity-month until now. I.e. if my last RareExpense was in July 
> 2014, it seems I get no empty months listed from August 2014 and onwards.
> 
> This behaviour is also consistently applied when using the --begin 
> predicate. For instance, had I no RareExpense in 2014 except for in July 
> (and none until now either), the following:
>     
>     ledger  -M --begin "2014/01" --empty reg ^Expenses:RareExpense
> 
> seems to give me a singleton list with only July represented.
> 
> That behaviour does not seem sensible to me. Am I doing something wrong or 
> is this a bug?

You haven't specified the exact behaviour you expect. I think you
wouldn't want it to automatically show periods up to today, eg say you
were working with an old ledger from 2000 (or 1500!).

When start/end dates have been specified (with -b/-e/-p/date:),
hledger will extend the report to those dates when -E/--empty is used. Eg:

2014/7/1
  (Expenses:RareExpense)   1

$ hledger reg -ME -b 2014/1/1 RareExpense
2014/01                                              0             0
2014/02                                              0             0
2014/03                                              0             0
2014/04                                              0             0
2014/05                                              0             0
2014/06                                              0             0
2014/07                 Ex:RareExpense               1             1

Another option would be to extend the report, either with or without -E,
to the journal's start/end date (the earliest and latest date of all
postings in the journal file(s)).


-- 

--- 
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.

Reply via email to