public function startDay()
    {
        $dateString = sprintf('%04d-%02d-01', $this->year->value(), $this->month);

        $datetime = new \DateTime($dateString);

        return (int) $datetime->format('N');
    }
public function startDay()
    {
        $dateString = sprintf('%04d-%02d-01', $this->year->value(), $this->month);

        $datetime = new \DateTime($dateString);

        return (int) $datetime->format('N');
    }
public function startDay ( ) { $ dateString = sprintf ( '%04d-%02d-01' , $ this -> year -> value ( ) , $ this -> month ) ; $ datetime = new \ DateTime ( $ dateString ) ; return ( int ) $ datetime -> format ( 'N' ) ; }
Returns the day of the week that the 1st of this month is on.

@return int
Returns the day of the week that the 1st of this month is on .