protected function _row_render_function($row, HTMLTableColumn $column, HTMLTable $table) { // $value = $table->get_row_id($row); // $name = $this->_name ? $this->_name : $table->get_id(); $name = $this->_name; $value = $row[$name]; $date = new Date($value); if ($this->_show_hour && $this->_show_seconds) { $format = Date::FORMAT_DEFAULT_DATETIME_SECS; } else { if ($this->_show_hour) { $format = Date::FORMAT_DEFAULT_DATETIME; } else { $format = Date::FORMAT_DEFAULT_DATE; } } $text = $date->format($format); return $text; }
/** * * @return $this * */ public function set_start_date($value) { if ($value) { $this->_start_date = Date::parse($value); } else { $this->_start_date = null; } return $this; }
public function copy() { $date = new Date(); $date->set_year($this->_year, false); $date->set_month($this->_month, false); $date->set_day($this->_day, false); $date->set_hour($this->_hour, false); $date->set_minutes($this->_min, false); $date->set_seconds($this->_secs, false); return $date; }