getDayPattern() public method

public getDayPattern ( )
Beispiel #1
0
 /**
  * @return array list of day options for a drop down list.
  */
 protected function getDropDownDayOptions()
 {
     $formatter = new TSimpleDateFormatter($this->getDateFormat());
     $days = array();
     $requiresPadding = $formatter->getDayPattern() === 'dd';
     for ($i = 1; $i <= 31; $i++) {
         $days[$i] = $requiresPadding ? str_pad($i, 2, '0', STR_PAD_LEFT) : $i;
     }
     return $days;
 }