I am trying to get the PHP \"DateInterval\" value in \"total minutes\" value. How to get it? Seems like simple format(\"%i minutes\") not working?
Here is the sampl
That works perfectly.
function calculateMinutes(DateInterval $int){ $days = $int->format('%a'); return ($days * 24 * 60) + ($int->h * 60) + $int->i; }