src/LocalDate.php
public function getDayOfYear() : int
    {
        return Month::of($this->month)->getFirstDayOfYear($this->isLeapYear()) + $this->day - 1;
    }
public function getDayOfYear() : int
    {
        return Month::of($this->month)->getFirstDayOfYear($this->isLeapYear()) + $this->day - 1;
    }
public function getDayOfYear ( ) : int { return Month :: of ( $ this -> month ) -> getFirstDayOfYear ( $ this -> isLeapYear ( ) ) + $ this -> day - 1 ; }
Returns the day-of-year, from 1 to 365, or 366 in a leap year.

@return int
Returns the day - of - year from 1 to 365 or 366 in a leap year .