Is there a function in PHP to convert Minutes to human readable format?
For example, convert hour to minutes
$weekday = 2 //Tuesday
$OpenTime = "18:00"
$open = explode(':',$OpenTime);
$MinutesOpen = $weekday * ($open[0] * 60 + $open[1]);
echo $MinutesOpen;
$MinutesOpen will be 2160
How to convert it back to HH:MM format?
php has a date() function can do what you want. or you can perform the calculation your self.
$str = sprintf('%02d:%02d', floor($min/60), $min%60)