Fix for issue #1167

This commit is contained in:
James Cole
2018-02-09 16:47:01 +01:00
parent c460419166
commit ac98822a55
6 changed files with 89 additions and 232 deletions

View File

@@ -90,8 +90,13 @@ class Navigation
*/
public function blockPeriods(\Carbon\Carbon $start, \Carbon\Carbon $end, string $range): array
{
if ($end < $start) {
list($start, $end) = [$end, $start];
}
$periods = [];
// Start by looping per period:
/*
* Start looping per months for 1 year + the rest of the year:
*/
$perMonthEnd = clone $end;
$perMonthStart = clone $end;
$perMonthStart->startOfyear()->subYear();
@@ -285,7 +290,7 @@ class Navigation
/**
* @param \Carbon\Carbon $theDate
* @param string $repeatFrequency
* @param string $repeatFrequency
*
* @return string
*