dozent_time_readable_format( int $seconds )


Parameters

$seconds

(int) (Required)


Return

(string)


Source

File: includes/core-functions.php

	function dozent_time_readable_format($seconds = 0)
	{
		if (!$seconds) {
			return "00:00";
		}

		$hours = floor($seconds / 3600);
		$mins = floor(($seconds - $hours * 3600) / 60);
		$s = $seconds - ($hours * 3600 + $mins * 60);

		$mins = ($mins < 10 ? "0" . $mins : "" . $mins);
		$s = ($s < 10 ? "0" . $s : "" . $s);

		$time = ($hours > 0 ? $hours . ":" : "") . $mins . ":" . $s;
		return $time;
	}

Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.