src/TimeLib.php
/**
     * Rounds a timestamp down to midnight on Monday of time it was taken
     * @param timestamp - the timestamp to round off.
     * @return roundedTimestamp - the rounded timestamp
     */
Rounds a timestamp down to midnight on Monday of time it was taken
@param timestamp - the timestamp to round off.
@return roundedTimestamp - the rounded timestamp
Rounds a timestamp down to midnight on Monday of time it was taken @param timestamp - the timestamp to round off . @return roundedTimestamp - the rounded timestamp
public static function roundTimestampToWeek($timestamp)
    {        
        $roundedToDay = self::roundTimestampToDay($timestamp);
        $weekDay  = date('w', $roundedToDay); 
        $daysToSubtract = $weekDay - 1;
        $roundedToWeek = strtotime("-" . $daysToSubtract . " day", $roundedToDay);
        return $roundedToWeek;
    }
public static function roundTimestampToWeek ( $ timestamp ) { $ roundedToDay = self :: roundTimestampToDay ( $ timestamp ) ; $ weekDay = date ( 'w' , $ roundedToDay ) ; $ daysToSubtract = $ weekDay - 1 ; $ roundedToWeek = strtotime ( " - " . $ daysToSubtract . "  day " , $ roundedToDay ) ; return $ roundedToWeek ; }
Rounds a timestamp down to midnight on Monday of time it was taken
 @param timestamp - the timestamp to round off.
Rounds a timestamp down to midnight on Monday of time it was taken @param timestamp - the timestamp to round off .
# 1 = Monday