function phutil_format_relative_time_detailed($duration, $levels)libphutil Technical Documentation (Core Utilities)
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 | $duration | Duration in seconds. |
int | $levels | Levels to render - will render the three highest levels, ie: 5 h, 37 m, 1 s |
Return
string | Human-readable description. |
- Defined
- src/utils/viewutils.php:32