메소드 |
설명 |
|
convertDateTime ( DateTime | string | integer $value, string $timezone, string $format = 'M j, Y H:i:s' ) : string |
Converts Time according to timezone parameter. |
|
convertTimeZone ( DateTime $dt, $remoteTz = NULL ) |
|
|
convertTz ( DateTime | string | integer $value, string $format = 'M j, Y H:i:s' ) : string |
Converts Time according to timezone settings of current user. |
|
convertTzFromUTC ( DateTime | string | integer $value, string $format = 'M j, Y H:i:s' ) : string |
Converts Time according to timezone settings of current user from UTC date. |
|
correctTime ( integer $time, float $tz_offset = null ) : integer |
Correct time with current timezone offset |
|
findTimezoneByOffset ( $offset ) |
|
|
getDateTimeDiff ( $dateTime1, $dateTime2, boolean $humanReadable = true ) : string | integer |
Calculates difference in seconds between two dates. |
|
getFuzzyTime ( integer | string $time, integer $tz_offset = null ) : string |
Gets a slightly more fuzzy time string. such as: yesterday at 3:51pm |
|
getFuzzyTimeString ( $value ) |
|
|
getHumanReadableTimeout ( integer | string $time, boolean $show_secs = true ) : string |
Converts a Unix timestamp or date/time string to a human-readable
format, such as '1 day, 2 hours, 42 mins, and 52 secs' |
|
getIncrescentTimeInterval ( $value, $currentTime = null ) : string |
Formats a time interval depending on the size according to:
- just now - interval < 1 min
- 2 min ago - interval < 30 mins
- 3:17 AM - today
- Yesterday, 3:17 AM - yesterday
- Jan. 10, 7:12 AM - current year
- Jan. 10,2015, 7:12 AM - less than the current year |
|
getTimezones ( boolean $returnOffset = false ) : array |
|
|
yearweek ( string $date ) : number |
Gets the week of the year in the same way as MYSQL's YEARWEEK(date, 0) MODE 0 |
|