Esempio n. 1
0
 public function getDates()
 {
     static $result;
     if (!isset($result)) {
         $year = $this->getState('year');
         $month = $this->getState('month');
         $days = KDate::getDaysInMonth($month, $year);
         $date = new KDate();
         $date->year($year);
         $date->month($month);
         $result = array();
         for ($day = 1; $day <= $days; $day++) {
             $date->day($day);
             $result[$date->format('%Y-%m-%d')] = 0;
         }
     }
     return $result;
 }