Génération de la liste des mois en français

@access public
@static
@param void
@return array $months liste des jours en français
540163
public function getFrenchMonths() {
        $months = array(
            1 => 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'
        );
        return $months;
    }
539968
public function listeActualites($params = array())
    {
        $html                     = "";
        $t                        = new tableau();
        $d                        = new dateObject();
        $pagination               = new paginationObject();
        $nbEnregistrementsParPage = 5;
        $reqCount                 = "SELECT 0 FROM actualites";
        $resCount                 = $this->connexionBdd->requete($reqCount);
        $arrayPagination          = $pagination->pagination(array('nomParamPageCourante'=>'page', 'nbEnregistrementsParPage'=>$nbEnregistrementsParPage, 'nbEnregistrementsTotaux'=>mysql_num_rows($resCount), 'typeLiens'=>'noformulaire'));
        $req                      = "SELECT idActualite, titre,sousTitre,date,photoIllustration,texte,urlFichier,desactive FROM actualites ORDER BY date DESC";
        $req                      = $pagination->addLimitToQuery($req);
        $res                      = $this->connexionBdd->requete($req);
        $t->addValue("Date");
        $t->addValue("Statut");
        $t->addValue("Titre");
        while ($fetch = mysql_fetch_assoc($res)) {
            $t->addValue("<a href='".$this->creerUrl('', 'adminActualites', array('archiIdActualite'=>$fetch['idActualite']))."'>".$d->toFrenchAffichage($fetch['date'])."</a>");
            if ($fetch['desactive']==1) {
                $t->addValue("desactivée");
            } else {
                $t->addValue("active");
            }
            $t->addValue(stripslashes($fetch['titre']));
        }
        $html .= $arrayPagination['html'];
        $html .= $t->createHtmlTableFromArray(3);
        return $html;
    }
277550
public function retrieveMonth($month) {
		if (!$month) {
			return 0;
		}
		$month = mb_strtolower($month);
		if (in_array($month, $this->monthList)) {
			$keys = array_keys($this->monthList, $month);
			return $keys[0] + 1;
		}
		return 0;
	}
453398
private function setMonthNames() {
		
		if (empty($this->options['locale']['monthNames'])) {
			$this->options['locale']['monthNames'] = array_values(
				Yii::app()->locale->getMonthNames('wide', true)
			);
		}
	}
288936
private static function getMonths(): array
    {
        $months = [-1 => static::getConstant('TXT_DATETIME_MMM', 'TXT_DATETIME_MMM')];
        for ($i = 1; $i <= 12; $i++) {
            $months[$i] = static::getConstant('TXT_DATETIME_MONTH_'.$i.'_SHORT', 'TXT_DATETIME_MONTH_'.$i.'_SHORT');
        }
        return $months;
    }
561305
public static function monthListBetweenDate($startDate, $endDate)
    {
		$output = [];
		$time   = strtotime($startDate);
		$last   = date('m-Y', strtotime($endDate));

		do {
		    $month = date('m-Y', $time);
		    $total = date('t', $time);

		    $output[] = [
		        'month' => $month,
		        'total' => $total,
		    ];

		    $time = strtotime('+1 month', $time);
		} while ($month != $last);
    }
63951
public static function calendar()
	{
		if (isset(self::$loaded[__METHOD__]))
		{
			return;
		}

		/*$tag = App::get('language')->getTag();

		$translation = self::_calendartranslation();
		if ($translation)
		{
			App::get('document')->addScriptDeclaration($translation);
		}*/

		Asset::stylesheet('assets/jquery.datepicker.css', array('media' => 'all'), true);
		Asset::stylesheet('assets/jquery.timepicker.css', array('media' => 'all'), true);

		self::framework(true);

		Asset::script('assets/jquery.timepicker.js', false, true);

		self::$loaded[__METHOD__] = true;
	}
406778
public static function ListAll()
    {
        $data = [];
        //
        $folders = glob(Application::$root.'resources/translator/*');
        //
        foreach ($folders as $key => $value) {
            $folder = \Strings::splite($value, 'resources/translator/');
            $folder = $folder[1];
            //
            $data[] = '>'.$folder;
            //
            foreach (glob(Application::$root.'resources/translator/'.$folder.'/*.php') as $key2 => $value2) {
                $file = \Strings::splite($value2, "app/lang/$folder/");
                $file = $file[1];
                //
                $data[] = '   '.$file;
            }
        }
        //
        return $data;
    }
603847
protected function formatMonthZeros(): string
    {
        if ($this->month > 9) {
            return I18N::digits($this->month);
        }

        return I18N::digits('0' . $this->month);
    }
536656
public function getHtmlAdminParcoursListe($params = array())
    {
        $html     = "<h1>Liste des parcours</h1>";
        $html    .= "<form action='' name='listesParcours' id='listesParcours' method='POST' enctype='multipart/form-data'>";
        $reqListe = "SELECT idParcours,libelleParcours FROM parcoursArt";
        $resListe = $this->connexionBdd->requete($reqListe);
        $t        = new tableau();
        $t->addValue('selection');
        $t->addValue('idParcours');
        $t->addValue('libelle');
        while ($fetchListe = mysql_fetch_assoc($resListe)) {
            $t->addValue("<input type='checkbox' name='selectParcours[]' id='selectParcours".$fetchListe['idParcours']."' value='".$fetchListe['idParcours']."'>");
            $t->addValue("<a href='".$this->creerUrl('', 'modifierParcoursFormulaireAdmin', array('archiIdParcours'=>$fetchListe['idParcours']))."'>".$fetchListe['idParcours']."</a>");
            $t->addValue("<a href='".$this->creerUrl('', 'etapesParcoursFormulaire', array('archiIdParcours'=>$fetchListe['idParcours']))."'>".stripslashes($fetchListe['libelleParcours'])."</a>");
        }
        $html .= $t->createHtmlTableFromArray(3);
        $html .= "<input type='button' name='supprSelection' id='supprSelection' value='Supprimer la sélection' onclick=\"if(confirm('Etes-vous certain de vouloir supprimer les parcours sélectionnés ?')){document.getElementById('listesParcours').action='".$this->creerUrl('supprimerParcours', 'adminListeParcours', array())."';document.getElementById('listesParcours').submit();}\">";
        $html .= "<input type='button' name='ajouterParcours' id='ajouterParcours' value='Ajouter' onclick=\"location.href='".$this->creerUrl('', 'ajouterParcoursFormulaireAdmin', array())."';\">";
        $html .= "</form>";
        return $html;
    }
1192668
public function addMonths($months)
    {
        if($months==0){
            return new DateTime($this->_time);
        }
        $year=$this->getYear();
        $month=$this->getMonth();
        $day=$this->getDay();
        if($months>0){
            $addYears=floor($months/12);
            $addMonths=$months%12;
            while ($addMonths+$month>12){
                $addYears++;
                $addMonths-=12;
            }
            $str=strval($year+$addYears)."-".strval($addMonths+$month)."-01";
            $lastDay = date("t",strtotime($str));//当月的最后一天
            if($day>$lastDay){
                $day=$lastDay;
            }
            $str=strval($year+$addYears)."-".strval($addMonths+$month)."-".$day." ".date("H:i:s",$this->_time);
            return new DateTime(strtotime($str));
        }else{
            $months=abs($months);
            $addYears=floor($months/12);
            $addMonths=$months%12;
            while($month-$addMonths<=0){
                $addYears++;
                $addMonths-=12;
            }
            $str=strval($year-$addYears)."-".strval($month-$addMonths)."-01";
            $lastDay = date("t",strtotime($str));//当月的最后一天
            if($day>$lastDay){
                $day=$lastDay;
            }
            $str=strval($year-$addYears)."-".strval($month-$addMonths)."-".$day." ".date("H:i:s",$this->_time);
            return new DateTime(strtotime($str));
        }
    }
902180
private static function getMonthSequence(array $months, $target, $withCurrent)
    {
        if (!in_array($target, $months)) {
            throw new LogicException(
                sprintf('Target month "%s" is out of range. The range must be from 01 up to 12', $target)
            );
        }

        $collection = array();

        foreach ($months as $month) {
            if ($month == $target) {
                if ($withCurrent === true) {
                    $collection[] = $month;
                }
                break;
            } else {
                $collection[] = $month;
            }
        }

        return $collection;
    }
1178555
private static Map<String, Integer> monthsMapping() {
        final Map<String, Integer> stringMapping = new HashMap<>();
        stringMapping.put("JAN", 1);
        stringMapping.put("FEB", 2);
        stringMapping.put("MAR", 3);
        stringMapping.put("APR", 4);
        stringMapping.put("MAY", 5);
        stringMapping.put("JUN", 6);
        stringMapping.put("JUL", 7);
        stringMapping.put("AUG", 8);
        stringMapping.put("SEP", 9);
        stringMapping.put("OCT", 10);
        stringMapping.put("NOV", 11);
        stringMapping.put("DEC", 12);
        return stringMapping;
    }
685722
public function monthToString($month, $abbr=false)
  {
    switch($month){
      case 1:
        return $abbr ? $this->translate('MONTH_JANUARY_SHORT') : $this->translate('MONTH_JANUARY');
      case 2:
        return $abbr ? $this->translate('MONTH_FEBRUARY_SHORT') : $this->translate('MONTH_FEBRUARY');
      case 3:
        return $abbr ? $this->translate('MONTH_MARCH_SHORT') : $this->translate('MONTH_MARCH');
      case 4:
        return $abbr ? $this->translate('MONTH_APRIL_SHORT') : $this->translate('MONTH_APRIL');
      case 5:
        return $abbr ? $this->translate('MONTH_MAY_SHORT') : $this->translate('MONTH_MAY');
      case 6:
        return $abbr ? $this->translate('MONTH_JUNE_SHORT') : $this->translate('MONTH_JUNE');
      case 7:
        return $abbr ? $this->translate('MONTH_JULY_SHORT') : $this->translate('MONTH_JULY');
      case 8:
        return $abbr ? $this->translate('MONTH_AUGUST_SHORT') : $this->translate('MONTH_AUGUST');
      case 9:
        return $abbr ? $this->translate('MONTH_SEPTEMBER_SHORT') : $this->translate('MONTH_SEPTEMBER');
      case 10:
        return $abbr ? $this->translate('MONTH_OCTOBER_SHORT') : $this->translate('MONTH_OCTOBER');
      case 11:
        return $abbr ? $this->translate('MONTH_NOVEMBER_SHORT') : $this->translate('MONTH_NOVEMBER');
      case 12:
        return $abbr ? $this->translate('MONTH_DECEMBER_SHORT') : $this->translate('MONTH_DECEMBER');
    }
  }
867346
function init()
	{
		global $wp_locale;
		
		$this->l10n = array(
			'closeText'         => __( 'Done', 'acf' ),
	        'currentText'       => __( 'Today', 'acf' ),
	        'monthNames'        => array_values( $wp_locale->month ),
	        'monthNamesShort'   => array_values( $wp_locale->month_abbrev ),
	        'monthStatus'       => __( 'Show a different month', 'acf' ),
	        'dayNames'          => array_values( $wp_locale->weekday ),
	        'dayNamesShort'     => array_values( $wp_locale->weekday_abbrev ),
	        'dayNamesMin'       => array_values( $wp_locale->weekday_initial ),
	        'isRTL'             => isset($wp_locale->is_rtl) ? $wp_locale->is_rtl : false,
		);
	}
912637
public static String[] getMonths(Locale locale) {
		if (locale == null) {
			locale = Locale.US;
		}
		DateFormatSymbols dfs = DateFormatSymbols.getInstance(locale);
		return dfs.getMonths();
	}
593375
public function build()
    {
        if (!isset($this->currentDate)) {
            return array();
        }

        // We need to know how many months to display, so that's the first job:
        $monthsToDisplay = array();
        $thisMonth = new Month($this->currentDate);

        // Go backwards first:
        for ($i = $this->monthOverflow['left']; $i != 0; $i --) {
            $monthsToDisplay[] = $thisMonth->prev($i);
        }

        // And the current:
        $monthsToDisplay[] = $thisMonth;

        // And then forwards:
        for ($i = 1; $i <= $this->monthOverflow['right']; $i ++) {
            $monthsToDisplay[] = $thisMonth->next($i);
        }

        return $monthsToDisplay;
    }