Returns the twelve months of the year in an array.

@return Month[]
325026
public static function getAll() : array
    {
        $months = [];

        for ($month = Month::JANUARY; $month <= Month::DECEMBER; $month++) {
            $months[] = Month::get($month);
        }

        return $months;
    }
14280
public function addMonths($n)
    {
        $an = abs($n);
        $years = floor($an / 12);
        $months = $an % 12;

        if ($n < 0) {
            $this->year -= $years;
            $this->month -= $months;
            if ($this->month < 1) {
                $this->year--;
                $this->month = 12 + $this->month;
            }
        } else {
            $this->year += $years;
            $this->month += $months;
            if ($this->month > 12) {
                $this->year++;
                $this->month -= 12;
            }
        }

        return $this;
    }
882201
public function allCensusDates(): array
    {
        return [
            new CensusOfFrance1831(),
            new CensusOfFrance1836(),
            new CensusOfFrance1841(),
            new CensusOfFrance1846(),
            new CensusOfFrance1851(),
            new CensusOfFrance1856(),
            new CensusOfFrance1861(),
            new CensusOfFrance1866(),
            new CensusOfFrance1872(),
            new CensusOfFrance1876(),
            new CensusOfFrance1881(),
            new CensusOfFrance1886(),
            new CensusOfFrance1891(),
            new CensusOfFrance1896(),
            new CensusOfFrance1901(),
            new CensusOfFrance1906(),
            new CensusOfFrance1911(),
            new CensusOfFrance1921(),
            new CensusOfFrance1926(),
            new CensusOfFrance1931(),
            new CensusOfFrance1936(),
            new CensusOfFrance1946(),
        ];
    }
79990
public function toArray()
    {
        $array = ['Enabled' => Utilities::booleanToString($this->_enabled)];
        if (isset($this->_days)) {
            $array['Days'] = strval($this->_days);
        }

        return $array;
    }
1274565
public function getFiscalYears()
  {
    $fiscalYears = array();

    $this->FiscalYear->byOrganization($this->AuthenticationManager->getCurrentUserOrganizationId())->each(function($FiscalYear) use (&$fiscalYears)
    {
      array_push($fiscalYears, $FiscalYear->year);
    });

    return $fiscalYears;
  }
407000
public function getArray()
    {
        return [$this->r, $this->g, $this->b, round(1 - $this->a / 127, 2)];
    }
168810
public function getDates()
    {
        return $this->cache(__FUNCTION__, function () {
            $casts = $this->getCasts();

            $dates = [];

            foreach ($casts as $key => $cast) {
                if ($cast == 'datetime') {
                    $dates[] = $key;
                }
            }

            return $dates;
        });
    }
1255673
public static function selectMonths($format = '%02d'): array
    {
        $months = [];
        for ($i = 1; $i <= 12; $i++) {
            $val = sprintf($format, $i);
            $label = Date('F', strtotime('2000-' . $val . '-01'));
            $months[$val] = $label;
        }
        return $months;
    }
437086
public function get_months() {
        $months = array();

        $date = new \DateTime('@1263556800');
        $date->setTimezone(new \DateTimeZone('UTC'));
        for ($i = 1; $i <= 12; $i++) {
            $date->setDate(2000, $i, 15);
            $months[$i] = userdate($date->getTimestamp(), '%B', 'UTC');
        }

        return $months;
    }
353254
private Date[] getBeforeDays(int year, int month) {
        Calendar cal = Calendar.getInstance();
        cal.set(year, month, 1);
        int dayNum = getDayIndex(year, month, 1) - 1;
        Date[] date = new Date[dayNum];
        if (dayNum > 0)
            for (int i = 0; i < dayNum; i++) {
                cal.add(Calendar.DAY_OF_MONTH, -1);
                date[i] = cal.getTime();
            }

        return date;
    }
385098
public Date[] getDates()
   {
      int frequency = NumberHelper.getInt(m_frequency);
      if (frequency < 1)
      {
         frequency = 1;
      }

      Calendar calendar = DateHelper.popCalendar(m_startDate);
      List<Date> dates = new ArrayList<Date>();

      switch (m_recurrenceType)
      {
         case DAILY:
         {
            getDailyDates(calendar, frequency, dates);
            break;
         }

         case WEEKLY:
         {
            getWeeklyDates(calendar, frequency, dates);
            break;
         }

         case MONTHLY:
         {
            getMonthlyDates(calendar, frequency, dates);
            break;
         }

         case YEARLY:
         {
            getYearlyDates(calendar, dates);
            break;
         }
      }

      DateHelper.pushCalendar(calendar);
      
      return dates.toArray(new Date[dates.size()]);
   }
405952
protected function nextMonth(): array
    {
        return [
            $this->month === $this->calendar->monthsInYear() ? $this->nextYear($this->year) : $this->year,
            ($this->month % $this->calendar->monthsInYear()) + 1,
        ];
    }
1275912
public function toArray()
    {
        return array(
            'year' => $this->y,
            'month' => $this->m,
            'day' => $this->d,
            'hour' => $this->h,
            'minute' => $this->i,
            'second' => $this->s,
        );
    }
635648
private static Integer[] getAdjustedMonthDays(int year) {
        Integer[] newMonths;
        try {
            newMonths = ADJUSTED_MONTH_DAYS.get(Integer.valueOf(year));
        } catch (ArrayIndexOutOfBoundsException e) {
            newMonths = null;
        }
        if (newMonths == null) {
            if (isLeapYear(year)) {
                newMonths = DEFAULT_LEAP_MONTH_DAYS;
            } else {
                newMonths = DEFAULT_MONTH_DAYS;
            }
        }
        return newMonths;
    }
1243783
public function getFirstAndLastDayOfCurrentMonth()
  {
    $Date = new Carbon('first day of this month');
    $Date2 = new Carbon('last day of this month');

    return array('userFormattedFrom' => $Date->format($this->Lang->get('form.phpShortDateFormat')), 'userFormattedTo' => $Date2->format($this->Lang->get('form.phpShortDateFormat')), 'databaseFormattedFrom' => $Date->format('Y-m-d'), 'databaseFormattedTo' => $Date2->format('Y-m-d'));
  }
1110819
public static function getDays() {
        $days = array();
        for ($i = 1; $i <= 31; $i++) {
            if ($i < 10)
                $days[$i] = '0' . $i;
            else
                $days[$i] = $i;
        }
        return $days;
    }
1107554
public function monthAndYearInput($options = []) {
       $defaultOptions = [
		'id' => self::MONTH_YEAR_ID,
		'class' => 'form-control',
		'autocomplete' => self::AUTO_EXP_ATTR,
		'placeholder' => '•• / ••',
		'required' => true,
		'type' => 'tel',
	];
	$mergedOptions = array_merge($defaultOptions, $options);
	StripeHelper::secCheck($mergedOptions);
	$mergedOptions['data-stripe'] = self::MONTH_YEAR_ID;
	$inputs = Html::input('text', null, null, $mergedOptions);

	//Append hidden year and month inputs that will get value from mixed and send to stripe
	$inputs = $inputs . $this->monthInput(['type' => 'hidden']);
	$inputs = $inputs . $this->yearInput(['type' => 'hidden']);
	return $inputs;
    }