Skip to content

Commit

Permalink
refs #3074 fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Oct 30, 2013
1 parent 83cfb4c commit 57377fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/Period/Range.php
Expand Up @@ -283,7 +283,7 @@ protected function processOptimalSubperiods($startDate, $endDate)
$endDateIsEarlierThanToday = $endDate->isEarlier($this->today); // false

$isSame = $endOfWeek->toString() == $endDate->toString();
$isLaterEndOfWeek = $isLaterEndOfWeek || $isSame;
$isLaterEndOfWeek = $isLaterEndOfWeek || ($isSame && $endDate->isLater($this->today));

$y = $startDate->addPeriod(2, 'month')->setDay(1);
$useMonthsNextIteration = $y->isEarlier($endDate);
Expand Down

0 comments on commit 57377fa

Please sign in to comment.