Commit 591d70c6 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1928920: Making sure the from and to dates match to the correct day



As the report expects to show weeks beginning on Monday to match when
the cron runs for this report

Change-Id: I1eec06689acbf4f9716eab648556a1d833dea189
Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
parent adc54bc2
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2388,11 +2388,11 @@ function portfolioswithverifiers_stats_table($limit, $offset, $extra, $instituti
    }

    $from = strtotime($start);
    if (date('w', $from) > 1) {
    if (date('w', $from) !== 1) {
        $from = strtotime( $start . ' next Monday');
    }
    $to = strtotime($end);
    if (date('w', $to) > 1) {
    if (date('w', $to) !== 1) {
        $to = strtotime( $end . ' last Monday');
    }
    $daterange = array();
@@ -2832,11 +2832,11 @@ function verifiersummary_stats_table($limit, $offset, $extra, $institution, $url
        $count = count_records('institution_data', 'type', 'verifierportfolios', 'institution', $institution);
    }
    $from = strtotime($start);
    if (date('w', $from) > 1) {
    if (date('w', $from) !== 1) {
        $from = strtotime( $start . ' next Monday');
    }
    $to = strtotime($end);
    if (date('w', $to) > 1) {
    if (date('w', $to) !== 1) {
        $to = strtotime( $end . ' last Monday');
    }
    $daterange = array();