public function getSecondsAsText($seconds, $decimals = 2, $decPoint = ',', $thousandsSep = '.')
    {
        $seconds = floatval($seconds);

        if (60 > $seconds) {
            return sprintf('%ss', number_format($seconds, $decimals, $decPoint, $thousandsSep));
        }

        $minutes = floor($seconds / 60);

        if (3600 > $seconds) {
            return sprintf('%sm %ss', $minutes, number_format($seconds - ($minutes * 60), 0, $decPoint, $thousandsSep));
        }

        $hours = floor($minutes / 60);
        $minutes = $minutes - ($hours * 60);

        return sprintf('%sh %sm %ss', $hours, $minutes, number_format($seconds - ($minutes * 60) - ($hours * 3600), 0, $decPoint, $thousandsSep));
    }
public function getSecondsAsText($seconds, $decimals = 2, $decPoint = ',', $thousandsSep = '.')
    {
        $seconds = floatval($seconds);

        if (60 > $seconds) {
            return sprintf('%ss', number_format($seconds, $decimals, $decPoint, $thousandsSep));
        }

        $minutes = floor($seconds / 60);

        if (3600 > $seconds) {
            return sprintf('%sm %ss', $minutes, number_format($seconds - ($minutes * 60), 0, $decPoint, $thousandsSep));
        }

        $hours = floor($minutes / 60);
        $minutes = $minutes - ($hours * 60);

        return sprintf('%sh %sm %ss', $hours, $minutes, number_format($seconds - ($minutes * 60) - ($hours * 3600), 0, $decPoint, $thousandsSep));
    }
public function getSecondsAsText ( $ seconds , $ decimals = 2 , $ decPoint = ',' , $ thousandsSep = '.' ) { $ seconds = floatval ( $ seconds ) ; if ( 60 > $ seconds ) { return sprintf ( '%ss' , number_format ( $ seconds , $ decimals , $ decPoint , $ thousandsSep ) ) ; } $ minutes = floor ( $ seconds / 60 ) ; if ( 3600 > $ seconds ) { return sprintf ( '%sm %ss' , $ minutes , number_format ( $ seconds - ( $ minutes * 60 ) , 0 , $ decPoint , $ thousandsSep ) ) ; } $ hours = floor ( $ minutes / 60 ) ; $ minutes = $ minutes - ( $ hours * 60 ) ; return sprintf ( '%sh %sm %ss' , $ hours , $ minutes , number_format ( $ seconds - ( $ minutes * 60 ) - ( $ hours * 3600 ) , 0 , $ decPoint , $ thousandsSep ) ) ; }
Get Seconds As Text

@param float  $seconds
@param int    $decimals
@param string $decPoint
@param string $thousandsSep

@return string
Get Seconds As Text