hledger/hledger-lib/Hledger/Data
Dmitry Astapov 4049455f26 lib: Fix splitSpan for nthdayof{week,month} - start of DateSpan was not covered
Demonstration:

Consider year-test.journal:
```
2015/02/01 first half
    expenses  $1
    assets

2015/07/01 second half
    expenses  $2
    assets

2016/02/01 first half
    expenses  $4
    assets

2016/07/01 second half
    expenses  $8
    assets

2017/02/01 first half
    expenses  $16
    assets

2017/07/01 second half
    expenses  $32
    assets
```

Year balances are good:
```
$ hledger balance -f year-test.journal -p yearly
Balance changes in 2015/01/01-2017/12/31:

          || 2015  2016  2017
==========++==================
 assets   ||  $-3  $-12  $-48
 expenses ||   $3   $12   $48
----------++------------------
          ||    0     0     0
```

Note how first transaction in 2015 is not included. Note that this is old period expression, so this bug exsits in master:
```$ hledger balance -f year-test.journal -p 'every 2nd day of month'
Balance changes in 2015/07/02-2017/07/01:

          || 2015/07/02-2015/08/01  2015/08/02-2015/09/01  2015/09/02-2015/10/01  2015/10/02-2015/11/01  2015/11/02-2015/12/01  2015/12/02-2016/01/01  2016/01/02-2016/02/01  2016/02/02-2016/03/01  2016/03/02-2016/04/01  2016/04/02-2016/05/01  2016/05/02-2016/06/01  2016/06/02-2016/07/01  2016/07/02-2016/08/01  2016/08/02-2016/09/01  2016/09/02-2016/10/01  2016/10/02-2016/11/01  2016/11/02-2016/12/01  2016/12/02-2017/01/01  2017/01/02-2017/02/01  2017/02/02-2017/03/01  2017/03/02-2017/04/01  2017/04/02-2017/05/01  2017/05/02-2017/06/01  2017/06/02-2017/07/01
==========++========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
 assets   ||                     0                      0                      0                      0                      0                      0                    $-4                      0                      0                      0                      0                    $-8                      0                      0                      0                      0                      0                      0                   $-16                      0                      0                      0                      0                   $-32
 expenses ||                     0                      0                      0                      0                      0                      0                     $4                      0                      0                      0                      0                     $8                      0                      0                      0                      0                      0                      0                    $16                      0                      0                      0                      0                    $32
----------++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
          ||                     0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0
```

Note how 2015 is absent entirely. This is new expression, but i think that general nature of bug is the same...
```
$ hledger balance -f year-test.journal -p 'every 4th Apr'
Balance changes in 2016/04/04-2018/04/03:

          || 2016/04/04-2017/04/03  2017/04/04-2018/04/03
==========++==============================================
 assets   ||                  $-24                   $-32
 expenses ||                   $24                    $32
----------++----------------------------------------------
          ||                     0                      0
```
2017-11-25 21:43:13 +00:00
..
Account.hs lib: more compact debug output for Accounts 2017-09-29 18:50:18 -10:00
AccountName.hs Escape account names (#499) 2017-01-30 09:17:18 -08:00
Amount.hs Add Support for Rewriting Multipler Postings Into Different Commodities (#557) 2017-05-30 07:30:15 -07:00
AutoTransaction.hs Update AutoTransaction.hs 2017-06-07 12:56:43 +02:00
Commodity.hs Add Support for Rewriting Multipler Postings Into Different Commodities (#557) 2017-05-30 07:30:15 -07:00
Dates.hs lib: Fix splitSpan for nthdayof{week,month} - start of DateSpan was not covered 2017-11-25 21:43:13 +00:00
Journal.hs Rewrite of BalanceAssertion type to track its source position. 2017-10-16 13:25:03 -07:00
Ledger.hs lib: Added a new transaction to samplejournal. 2017-07-15 08:02:03 +01:00
MarketPrice.hs Added a simple 'showMarketPrice' function to show market price directives in a journal-compatible way (#505) 2017-02-03 18:20:00 -08:00
Period.hs ui: --watch: track date only when a standard period is in effect 2016-12-07 15:19:36 -08:00
Posting.hs lib: pivot -> journalPivot, drop implicit tags notion (#598, #608) 2017-09-05 10:48:35 -07:00
RawOptions.hs lib: optserror -> usageError, consolidate with other error functions (#529) 2017-03-29 08:00:51 -07:00
StringFormat.hs cli: refactor: move commands to a subdirectory, reinstate test command 2017-09-12 10:04:36 -07:00
Timeclock.hs lib: textification: descriptions & codes 2016-05-24 19:00:58 -07:00
Transaction.hs Rewrite of BalanceAssertion type to track its source position. 2017-10-16 13:25:03 -07:00
Types.hs Rewrite of BalanceAssertion type to track its source position. 2017-10-16 13:25:03 -07:00