-2

I Have two-time durations

  1. 5 hours and 55 minutes.
  2. 6 hours.

expecting the answer +5.00 or -5.00 for the difference between.

what are the best options to resolve the matter?

1 Answers1

0

Try this :

<?php

$time1 = '05:55';
$t1=strtotime($time1);

$end=strtotime('06:00'); 

$Min = floor((($end- $t1)/60));    

echo   $Min.' Min ';

?>
Léo R.
  • 2,620
  • 1
  • 10
  • 22