Cake\Chronos\Traits\ModifierTrait::lastOfMonth PHP Метод

lastOfMonth() публичный Метод

Modify to the last occurrence of a given day of the week in the current month. If no dayOfWeek is provided, modify to the last day of the current month. Use the supplied consts to indicate the desired dayOfWeek, ex. ChronosInterface::MONDAY.
public lastOfMonth ( integer | null $dayOfWeek = null ) : mixed
$dayOfWeek integer | null The day of the week to move to.
Результат mixed
    public function lastOfMonth($dayOfWeek = null)
    {
        $day = $dayOfWeek === null ? 'day' : static::$days[$dayOfWeek];
        return $this->modify("last {$day} of this month, midnight");
    }