17 lines
334 B
PHP
17 lines
334 B
PHP
<?php
|
|
class ClassTime {
|
|
public function __construct(){}
|
|
public function __destruct(){}
|
|
|
|
public function decimalToHHMM($dec){
|
|
$h = intval($dec);
|
|
$m = round((((($dec - $h) / 100.0) * 60.0) * 100), 0);
|
|
if($m=60){
|
|
$h++;
|
|
$m = 0;
|
|
}
|
|
$retval = sprintf("%02d:%02d", $h, $m);
|
|
return $retval;
|
|
}
|
|
|
|
} |