示例#1
0
 /**
  * Constructor.
  */
 public function __construct($month, $year)
 {
     parent::__construct();
     $this->mySubpart = 'MONTH_SUBPART';
     $this->month = intval($month);
     $this->year = intval($year);
     $this->generateWeeks();
     $controller =& \TYPO3\CMS\Cal\Utility\Registry::Registry('basic', 'controller');
     $controller->cache->set($month . '_' . $year, serialize($this), 'month', 60 * 60 * 24 * 365 * 100);
 }
示例#2
0
 /**
  * Constructor.
  */
 public function __construct($week, $year, $parentMonth = -1)
 {
     parent::__construct();
     $this->mySubpart = 'WEEK_SUBPART';
     if (DATE_CALC_BEGIN_WEEKDAY == 0) {
         $this->mySubpart = 'SUNDAY_WEEK_SUBPART';
     }
     $this->week = intval($week);
     $this->year = intval($year);
     $this->setParentMonth($parentMonth);
     $this->generateDays();
 }
示例#3
0
 /**
  * Constructor.
  */
 public function __construct($day, $month, $year, $parentMonth = -1)
 {
     parent::__construct();
     $this->mySubpart = 'DAY_SUBPART';
     $this->day = intval($day);
     $this->month = intval($month);
     $this->year = intval($year);
     $date = new \TYPO3\CMS\Cal\Model\CalDate();
     $date->setDay($this->day);
     $date->setMonth($this->month);
     $date->setYear($this->year);
     $this->weekdayNumber = $date->format('%w');
     $this->Ymd = $date->format('%Y%m%d');
     $this->time = $date->getTime();
     if ($parentMonth >= 0) {
         $this->setParentMonth(intval($parentMonth));
     } else {
         $this->setParentMonth($this->month);
     }
 }