• Resolved philippeetronnier

    (@philippeetronnier)


    <div class="ride-calendar-month-filter">
          <?php
          $monthArray = range(1, 12);
          ?>
          <div class="form-group">
              <label for="ride-calendar-month">Mois</label>
              <select name="ride-calendar-month" id="ride-calendar-month" size = 1>
                    <option value="00">Toute l'année</option>
                     <?php
                         foreach ($monthArray as $month) {
                            // padding the month with extra zero
                            $month_value = str_pad($month, 2, "0", STR_PAD_LEFT);
                            $month_name = date_i18n( 'F', mktime(0, 0, 0, $month) );
                            printf("<option value='%s'>%s</option>", $month_value, $month_name);
                        } 
                        ?>
                </select>
            </div>
    </div>

    I use this code to populate a dropdown to select a month.
    But function date_i18n returns several months twice.
    This appears today, it works before.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘date_i18n bug ?’ is closed to new replies.