public function previous($dayOfWeek = null) { if ($dayOfWeek === null) { $dayOfWeek = $this->dayOfWeek; } $day = static::$days[$dayOfWeek]; return $this->modify("last {$day}, midnight"); }