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

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

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