This topic is locked

Report - Week Start Day

10/11/2013 11:36:45 AM
PHPRunner General questions
P
phenicie author

I created a report, Grouped by Date Field, and organized by a Week interval.
Currently the Week interval is starting on Sunday, I would like that to change to Monday.
I found the following code in the classes/reportlib.php , but my knowledge is more in SQL than PHP. Is it possible to change that in the following code?
[indent]function cached_getweekstart($strtime)

{

global $cache_getweekstart;

if(!isset($cache_getweekstart[$strtime]))

{

$date = cached_db2time($strtime);

$res = getweekstart($date);

$cache_getweekstart[$strtime] = $res;

return $res;

}

else

return $cache_getweekstart[$strtime];

}
$cache_formatweekstart = array();

function cached_formatweekstart($strtime)

{

global $cache_formatweekstart;

if(!isset($cache_formatweekstart[$strtime]))

{

$start = cached_getweekstart($strtime);

$end = adddays($start, 6);

$res = format_shortdate($start)." - ".format_shortdate($end);

$cache_formatweekstart[$strtime] = $res;

return $res;

}

else

return $cache_formatweekstart[$strtime];

} [/indent]