Example #1
0
 /**
  * Format a date according to a user's "fuzzy dates" preference.
  *
  * @param $timestamp
  * @return string
  */
 public function formatDate($timestamp)
 {
     $date_full = date($this->settings['Long_Date_Format'], $timestamp);
     $date_fuzzy = Legacy\Utilities::age($timestamp, false, false, false, ' ago', 'raw_output');
     if ($this->user->getVariable('date_format') == 'full') {
         return '<span title="' . $date_fuzzy . '" class="popup_date">' . $date_full . '</span>';
     } else {
         return '<span title="' . $date_full . '" class="popup_date">' . $date_fuzzy . '</span>';
     }
 }