0
Example:
$primeiraData = Carbon::parse('2019-02-01 13:00:00');
$segundaData = Carbon::parse('2019-02-02 14:00:00');
$resultado = $segundaData->diffInHours($primeiraData);
Regardless of the order I put the variables it will have the same result "25" in this case. What I need is for you to show me whether that number is positive or negative.
That is to say:
- from 2019-02-01 13:00:00 until day 2019-02-02 14:00:00 = + 25
- from 2019-02-02 14:00:00 until day 2019-02-01 13:00:00 = - 25
related subject: https://answall.com/questions/269302/diferen%C3%A7a-in-hours-between-days-using-Carbon/269330#269330
– novic