There You go.
function skryptLenia($minutes) {
$date1 = date_create
(date('Y-m-d H:i:s')); $date2 = date_create
(date('Y-m-d H:i:s', strtotime('+'.$minutes.' minutes'))); $dateDiff = date_diff($date1, $date2);
$result = $dateDiff->format('Days:%d,Hours:%H,Minutes:%i');
return $result;
}
Można też to zrobić zwykłym dzieleniem. Powyższe wymaga PHP 5.3 wzwyż.