/**
  * The main constructor method
  */
 public function __construct($args = array())
 {
     parent::__construct($args);
     // Set the mode
     $this->mode = 'month';
     // Setup the view ranges
     $this->view_start = "{$this->year}-{$this->month}-01 00:00:00";
     $this->view_end = "{$this->year}-{$this->month}-31 00:00:00";
 }
 /**
  * The main constructor method
  */
 public function __construct($args = array())
 {
     parent::__construct($args);
     // Setup the view ranges
     $this->view_start = "{$this->year}-{$this->month}-01 00:00:00";
     $mon = mysql2date('U', $this->view_start);
     $eom = strtotime('+1 month', $mon);
     $this->view_end = date_i18n('Y-m-d H:i:s', $eom);
 }
예제 #3
0
 /**
  * The main constructor method
  */
 public function __construct($args = array())
 {
     parent::__construct($args);
     // Setup the week ranges
     $this->day_start = strtotime('midnight', $this->today);
     $this->day_end = strtotime('tomorrow', $this->day_start);
     // Setup the day ranges
     $this->view_start = date_i18n('Y-m-d H:i:s', $this->day_start);
     $this->view_end = date_i18n('Y-m-d H:i:s', $this->day_end);
 }
 /**
  * The main constructor method
  */
 public function __construct($args = array())
 {
     parent::__construct($args);
     // Reset the week
     $where_is_thumbkin = 0 === date('w') ? 'this Sunday midnight' : 'last Sunday midnight';
     // Setup the week ranges
     $this->week_start = strtotime($where_is_thumbkin, $this->today);
     $this->week_end = strtotime('this Saturday midnight', $this->today);
     // Setup the week ranges
     $this->view_start = date_i18n('Y-m-d H:i:s', $this->week_start);
     $this->view_end = date_i18n('Y-m-d H:i:s', $this->week_end);
 }
 /**
  * The main constructor method
  */
 public function __construct($args = array())
 {
     parent::__construct($args);
     // Set the mode
     $this->mode = 'week';
     // Setup the week ranges
     $this->week_start = strtotime('last Sunday midnight', $this->today);
     $this->week_end = strtotime('this Saturday midnight', $this->today);
     // Setup the week ranges
     $this->view_start = date_i18n('Y-m-d H:i:s', $this->week_start);
     $this->view_end = date_i18n('Y-m-d H:i:s', $this->week_end);
 }