示例#1
0
文件: date.php 项目: 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);
 }
示例#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());
 }