fast\Date
/**
* 計算兩個時區間相差的時長,單位為秒
* @param string $remote timezone that to find the offset of
* @param string $local timezone used as the baseline
* @param mixed $now UNIX timestamp or date string
* @return integer
*/
offset($remote, $local = NULL, $now = NULL)
/**
* 計算兩個時間戳之間相差的時間
* @param int $remote timestamp to find the span of
* @param int $local timestamp to use as the baseline
* @param string $output formatting string
* @return string when only a single output is requested
* @return array associative list of all outputs requested
* @from https://github.com/kohana/ohanzee-helpers/blob/master/src/Date.php
*/
span($remote, $local = NULL, $output = 'years,months,weeks,days,hours,minutes,seconds')
/**
* 格式化 UNIX 時間戳為人易讀的字符串
*
* @param int Unix 時間戳
* @param mixed $local 本地時間
*
* @return string 格式化的日期字符串
*/
human($remote, $local = null)
/**
* 獲取一個基于時間偏移的Unix時間戳
*
* @param string $type 時間類型,默認為day,可選minute,hour,day,week,month,quarter,year
* @param int $offset 時間偏移量 默認為0,正數表示當前type之后,負數表示當前type之前
* @param string $position 時間的開始或結束,默認為begin,可選前(begin,start,first,front),end
* @param int $year 基準年,默認為null,即以當前年為基準
* @param int $month 基準月,默認為null,即以當前月為基準
* @param int $day 基準天,默認為null,即以當前天為基準
* @param int $hour 基準小時,默認為null,即以當前年小時基準
* @param int $minute 基準分鐘,默認為null,即以當前分鐘為基準
* @return int 處理后的Unix時間戳
*/
unixtime($type = 'day', $offset = 0, $position = 'begin', $year = null, $month = null, $day = null, $hour = null, $minute = null)