Closed vipera7 closed 10 months ago
Hello,
You can skip any units you don't want in the forHumans()
options:
echo CarbonInterval::fromString('3w 18d 53h 159m')->cascade()->forHumans([
'skip' => ['week', 'month', 'year'],
]);
Output your expected string:
41 days 7 hours 39 minutes
Hello,
I encountered an issue with the following code:
Carbon version: 2.72.1
PHP version: 8.2.13 (from https://play.phpsandbox.io)
I expected to get:
But I actually get:
Thanks!