public function __construct($args = NULL) { parent::__construct($args); $this->_format = array('db' => 'P%Y-%P'); if ($this->_periodEnd($this->range()->getMaxStamp()) > $this->range()->getMaxStamp()) { $this->range()->moveMaxDate('-28d'); } $this->_data = qw2('table>period systemName>period'); }
public function __construct($args = NULL) { parent::__construct($args); $this->_format = array('db' => 'D%x.%D'); if ($this->_periodEnd($this->range()->getMaxStamp()) > $this->range()->getMaxStamp()) { $this->range()->moveMaxDate('-14d'); } $this->_data = qw2('table>double_weeks systemName>double'); }
public function __construct($args = NULL) { parent::__construct($args); $this->_format = array('db' => '%x.%v'); if ($this->_weekEnd($this->range()->getMaxStamp()) > $this->range()->getMaxStamp()) { $this->range()->moveMaxDate('-7d'); } $this->_data = qw2('table>week systemName>week'); }
public function __construct($args = NULL) { parent::__construct($args); $this->_format = array('db' => '%Y-Q%Q'); $st = $this->range()->getMaxStamp(); while ($this->_periodEnd($st) > $this->range()->getMaxStamp()) { $st = $this->_periodStart($st) - 86400; } $this->range()->setMaxDate($st); $this->_data = qw2('table>quarter systemName>quarter'); }
public function __construct($args = NULL) { parent::__construct($args); $this->_format = array('db' => '%Y-%m'); $st = $this->range()->getMaxStamp(); while ($this->_periodEnd($st) > $this->range()->getMaxStamp()) { $st = M('Date')->addToStamp($this->_periodStart($st), '-1d'); } $this->range()->setMaxDate($st); $this->_data = qw2('table>month systemName>month'); }