src/DateTime/RhubarbDateTime.php
public static function previousMonday($referenceDate = null)
    {
        if ($referenceDate == null) {
            $referenceDate = new RhubarbDateTime("today");
        }

        $dayOfWeek = $referenceDate->format("N") - 1;

        $referenceDate->modify(-$dayOfWeek . " days");

        return $referenceDate;
    }
public static function previousMonday($referenceDate = null)
    {
        if ($referenceDate == null) {
            $referenceDate = new RhubarbDateTime("today");
        }

        $dayOfWeek = $referenceDate->format("N") - 1;

        $referenceDate->modify(-$dayOfWeek . " days");

        return $referenceDate;
    }
public static function previousMonday ( $ referenceDate = null ) { if ( $ referenceDate == null ) { $ referenceDate = new RhubarbDateTime ( "today" ) ; } $ dayOfWeek = $ referenceDate -> format ( "N" ) - 1 ; $ referenceDate -> modify ( - $ dayOfWeek . " days" ) ; return $ referenceDate ; }
Returns the date of the Monday of this week.

This is often used as a handle on the week commencing date

@param RhubarbDateTime $referenceDate The date to find the previous Monday of. Today if null.
@return RhubarbDateTime
Returns the date of the Monday of this week .