Swat/SwatString.php
public static function toHumanReadableTimePeriod(
        $seconds,
        $largest_part = false
    ) {
        $parts = self::getHumanReadableTimePeriodParts($seconds);
        return self::toHumanReadableTimePeriodString($parts, $largest_part);
    }
public static function toHumanReadableTimePeriod(
        $seconds,
        $largest_part = false
    ) {
        $parts = self::getHumanReadableTimePeriodParts($seconds);
        return self::toHumanReadableTimePeriodString($parts, $largest_part);
    }
public static function toHumanReadableTimePeriod ( $ seconds , $ largest_part = false ) { $ parts = self :: getHumanReadableTimePeriodParts ( $ seconds ) ; return self :: toHumanReadableTimePeriodString ( $ parts , $ largest_part ) ; }
Gets a human-readable string representing a time period

This method formats seconds as a time period. Given an example value
of 161740805, the formatted value "5 years, 3 months, 2 days and 5
seconds" is returned.

As this method applies on seconds, no time zone considerations are
made. Years are assumed to be 365 days. Months are assumed to be 30 days.

@param integer $seconds seconds to format.
@param boolean $largest_part optional. If true, only the largest
matching date part is returned. For the
above example, "5 years" is returned.

@return string A human-readable time period.
Gets a human - readable string representing a time period