getDayMonthYearOrdering() public method

Exemplo n.º 1
0
 /**
  * Renders the calendar drop down list depending on the DateFormat pattern.
  * @param THtmlWriter the Html writer to render the drop down lists.
  * @param array the current selected date
  */
 protected function renderCalendarSelections($writer, $date)
 {
     $formatter = new TSimpleDateFormatter($this->getDateFormat());
     foreach ($formatter->getDayMonthYearOrdering() as $type) {
         if ($type == 'day') {
             $this->renderCalendarDayOptions($writer, $date['mday']);
         } elseif ($type == 'month') {
             $this->renderCalendarMonthOptions($writer, $date['mon']);
         } elseif ($type == 'year') {
             $this->renderCalendarYearOptions($writer, $date['year']);
         }
     }
 }