Contao\Date::getWeekBegin PHP Method

getWeekBegin() public method

Return the begin of the week as timestamp
public getWeekBegin ( integer $intStartDay ) : integer
$intStartDay integer The week start day
return integer The Unix timestamp
    public function getWeekBegin($intStartDay = 0)
    {
        $intOffset = date('w', $this->strDate) - $intStartDay;
        if ($intOffset < 0) {
            $intOffset += 7;
        }
        return strtotime('-' . $intOffset . ' days', $this->strDate);
    }