Page MenuHomePhorge
Diviner libphutil Tech Docs phutil_format_relative_time_detailed

function phutil_format_relative_time_detailed($duration, $levels)
libphutil Technical Documentation (Core Utilities)

Format a relative time (duration) into weeks, days, hours, minutes, seconds, but unlike phabricator_format_relative_time, does so for more than just the largest unit.

Parameters
int$durationDuration in seconds.
int$levelsLevels to render - will render the three highest levels, ie: 5 h, 37 m, 1 s
Return
stringHuman-readable description.