public function getMonths($year)
    {
        $year = $this->yearOrYearNo($year);

        $months = array();

        for ($monthNo = 1; $monthNo <= 12; $monthNo++) {
            $months[$monthNo] = new Month($year, $monthNo);
        }

        return $months;
    }
public function getMonths($year)
    {
        $year = $this->yearOrYearNo($year);

        $months = array();

        for ($monthNo = 1; $monthNo <= 12; $monthNo++) {
            $months[$monthNo] = new Month($year, $monthNo);
        }

        return $months;
    }
public function getMonths ( $ year ) { $ year = $ this -> yearOrYearNo ( $ year ) ; $ months = array ( ) ; for ( $ monthNo = 1 ; $ monthNo <= 12 ; $ monthNo ++ ) { $ months [ $ monthNo ] = new Month ( $ year , $ monthNo ) ; } return $ months ; }
Get this months for the given year.

@param  int|Year $year
@return Month[]
Get this months for the given year .