Skip to content

Commit 2e13dba

Browse files
author
David Tahir
committed
include current week in calculation
1 parent eedc011 commit 2e13dba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Controller/AjaxController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,7 @@ public function getWeeksSince($timestamp){
11991199
$oneWeek = \DateInterval::createFromDateString('1 week');
12001200
$currentWeek = $start;
12011201
$weeks = [];
1202-
while ($currentWeek < $end){
1202+
while ($currentWeek <= $end){
12031203
$weeks[] = $currentWeek->format("Y-m-d");
12041204
$currentWeek->add($oneWeek);
12051205
}
@@ -1211,7 +1211,7 @@ public function getMonthsSince($timestamp){
12111211
$oneMonth = \DateInterval::createFromDateString('1 month');
12121212
$currentMonth = $start;
12131213
$months = [];
1214-
while ($currentMonth < $end){
1214+
while ($currentMonth <= $end){
12151215
$months[] = $currentMonth->format("Y-m");
12161216
$currentMonth->add($oneMonth);
12171217
}

0 commit comments

Comments
 (0)