Some time you may need to find the day, hour and min and seconds for ex:
*you entered a number 105
and you want 1h-45Min ago*
then you can simply use the following function although you can use your custom function as well depends on the need.
Function call:
$wt =105;
getWaitingTime($wt);
Function Definition:
public function getWaitingTime($wt) {
$hour = intval(gmdate("i", $wt)).'h-';
if($hour==0)
$hour = '';
$min = intval(gmdate("s", $wt)).'Min';
if($min==0)
$hour = '';
return $hour.$min. ago.;
}
0 Comment(s)