# 1. monthly reporting interval, no end dates, shows just the intervals with data:
<
2011/2/1
  (a)    1
  (a:b)  1

$ hledger -f- register --period 'monthly'
2011-02                 a                                        1             1
                        a:b                                      1             2

# 2. or with a query pattern, just the intervals with matched data:
<
2011/1/1
  (a)  1

2011/2/1
  (b)  1

$ hledger -f- register --period 'monthly' b
2011-02                 b                                        1             1

<
2011/1/1
  (a)  1

2011/2/1
  (b)  1

2011/3/1
  (c)  1

# 3. with --empty, show all intervals spanned by the journal
# (unlike current ledger, but more useful)
$ hledger -f- register --period 'monthly' b --empty
2011-01                                                          0             0
2011-02                 b                                        1             1
2011-03                                                          0             1

# 4. any specified begin/end dates limit the intervals reported
$ hledger -f- register --period 'monthly to 2011/3/1' b --empty
2011-01                                                          0             0
2011-02                 b                                        1             1

# 5. --date2 should work with intervals
<
2014/1/1
  (a)  1

2014/2/1=2014/1/31
  (b)  1

$ hledger -f- register --monthly --date2
2014-01                 a                                        1             1
                        b                                        1             2

# 6. All matched postings in the displayed intervals should be reported on.
<
2014/1/5
 (before)  1

2014/2/1
 (within)  1

2014/2/25
 (after)  1

$ hledger -f- register -p 'monthly 2014/1/10-2014/2/20'
2014-01                 before                                   1             1
2014-02                 after                                    1             2
                        within                                   1             3

