GDM/Framework/Types/Date.php
static function monthsOfTheYear($format = "F")
    {
        $result      = [];
        $start       = new self('January this year');
        $interval    = new \DateInterval('P1M');
        $recurrences = 11;
        foreach (new \DatePeriod($start, $interval, $recurrences) as $date) {
            $result[] = $date->format($format);
        }
        return $result;
    }
static function monthsOfTheYear($format = "F")
    {
        $result      = [];
        $start       = new self('January this year');
        $interval    = new \DateInterval('P1M');
        $recurrences = 11;
        foreach (new \DatePeriod($start, $interval, $recurrences) as $date) {
            $result[] = $date->format($format);
        }
        return $result;
    }
static function monthsOfTheYear ( $ format = "F" ) { $ result = [ ] ; $ start = new self ( 'January this year' ) ; $ interval = new \ DateInterval ( 'P1M' ) ; $ recurrences = 11 ; foreach ( new \ DatePeriod ( $ start , $ interval , $ recurrences ) as $ date ) { $ result [ ] = $ date -> format ( $ format ) ; } return $ result ; }
Returns and array of all the months in a year

@param type $format [optional]<p>Format to return the days as. eg F will return full textual representation of each month, such as January or March, M will return short textual representation of each month, three letters Jan through Dec</p>
@return array <p>The array containing all the months of the year in the specified format</p>
@link http://www.php.net/manual/en/datetime.formats.php Date and Time Formats
Returns and array of all the months in a year