Esempio n. 1
0
File: date.php Progetto: anqh/core
 /**
  * Returns the difference between timestamps in a "fuzzy" way.
  *
  * @param   integer  $timestamp
  * @param   integer  $timestamp2  Defaults to now
  * @return  string
  */
 public static function fuzzy_span($timestamp, $timestamp2 = null)
 {
     // If timestamp2 given, pad the actual timestamp to make up the time
     return parent::fuzzy_span($timestamp2 ? $timestamp - $timestamp2 + time() : $timestamp);
 }
Esempio n. 2
0
 public static function deformatted_time($datetime_str = 'now', $timestamp_format = NULL, $timezone = NULL)
 {
     $date = parent::formatted_time($datetime_str, $timestamp_format, $timezone);
     return strtr($date, self::_get_monthes());
 }