src/Month.php
public function getFirstDayOfYear(bool $leapYear) : int
    {
        $leap = $leapYear ? 1 : 0;

        switch ($this->month) {
            case Month::JANUARY:
                return 1;
            case Month::FEBRUARY:
                return 32;
            case Month::MARCH:
                return 60 + $leap;
            case Month::APRIL:
                return 91 + $leap;
            case Month::MAY:
                return 121 + $leap;
            case Month::JUNE:
                return 152 + $leap;
            case Month::JULY:
                return 182 + $leap;
            case Month::AUGUST:
                return 213 + $leap;
            case Month::SEPTEMBER:
                return 244 + $leap;
            case Month::OCTOBER:
                return 274 + $leap;
            case Month::NOVEMBER:
                return 305 + $leap;
        }

        return 335 + $leap;
    }
public function getFirstDayOfYear(bool $leapYear) : int
    {
        $leap = $leapYear ? 1 : 0;

        switch ($this->month) {
            case Month::JANUARY:
                return 1;
            case Month::FEBRUARY:
                return 32;
            case Month::MARCH:
                return 60 + $leap;
            case Month::APRIL:
                return 91 + $leap;
            case Month::MAY:
                return 121 + $leap;
            case Month::JUNE:
                return 152 + $leap;
            case Month::JULY:
                return 182 + $leap;
            case Month::AUGUST:
                return 213 + $leap;
            case Month::SEPTEMBER:
                return 244 + $leap;
            case Month::OCTOBER:
                return 274 + $leap;
            case Month::NOVEMBER:
                return 305 + $leap;
        }

        return 335 + $leap;
    }
public function getFirstDayOfYear ( bool $ leapYear ) : int { $ leap = $ leapYear ? 1 : 0 ; switch ( $ this -> month ) { case Month :: JANUARY : return 1 ; case Month :: FEBRUARY : return 32 ; case Month :: MARCH : return 60 + $ leap ; case Month :: APRIL : return 91 + $ leap ; case Month :: MAY : return 121 + $ leap ; case Month :: JUNE : return 152 + $ leap ; case Month :: JULY : return 182 + $ leap ; case Month :: AUGUST : return 213 + $ leap ; case Month :: SEPTEMBER : return 244 + $ leap ; case Month :: OCTOBER : return 274 + $ leap ; case Month :: NOVEMBER : return 305 + $ leap ; } return 335 + $ leap ; }
Returns the day-of-year for the first day of this month.

This returns the day-of-year that this month begins on, using the leap
year flag to determine the length of February.

@param bool $leapYear

@return int
Returns the day - of - year for the first day of this month .