Closed lucraraujo closed 2 years ago
Helllo, this is the expected behavior, there are many cases where you don't want to resolve plus after the hour, the number of hours in day is not a constant (because of DST), days in months neither (28, 29, 30 or 31), so it has to be done with:
$object->cascade()->forHumans()
cascade
then use factors that can be modified see setCascadeFactors
in the doc https://carbon.nesbot.com/docs/#api-interval
PS: neither CarbonInterval
(nor DateInterval
AFAIK) store or calculate on the fly the cascaded interval, what appears here interval: + 03:37:13.0
is very likely done for debugging by the dd
method.
Carbon version: 2.62.1 PHP version: 8.1.11
Hello,
I have a CarbonInterval that is a sum of many CarbonInterval objects. The sum object is this one (laravel dd)
When I call
$object->forHumans()
I get the string1 hour 152 minutes 313 seconds
.I expected to get
3 hours 37 minutes 13 seconds
.I can see that a internal
interval
object store the time the way I want but I can't access it.