/** * Record difference in times, if any * @param string $name * @param DATE_TIME $orig_date * @param DATE_TIME $new_date * @param string $type Type of date-time formatting to use. * @access private */ protected function _record_time_difference($name, $orig_date, $new_date, $type = Date_time_format_short_date_and_time) { if (!$orig_date->equals($new_date)) { $f = $orig_date->formatter(); $f->set_type_and_clear_flags($type); if ($orig_date->is_valid()) { $orig_text = $orig_date->format($f); } else { $orig_text = '[not set]'; } if ($new_date->is_valid()) { $new_text = $new_date->format($f); } else { $new_text = '[not set]'; } $this->_record_string_difference($name, $orig_text, $new_text); } }
/** * Has this object been changed since it was created? * @return boolean */ public function modified() { return !$this->time_created->equals($this->time_modified); }
public function date_style() { if ($this->first_day_mode == Day_mode_adjust) { return Album_is_adjusted; } if ($this->last_day_mode == Day_mode_today) { return Album_is_journal; } if ($this->first_day->equals($this->last_day, Date_time_date_part)) { return Album_is_single_day; } return Album_is_span; }
/** * @return boolean */ public function modified() { if ($this->time_published->is_valid()) { return !$this->time_published->equals($this->time_modified); } return parent::modified(); }