Adgower
3 months ago
842
7
Laravel

Format date with Carbon diffForHumans

Posted 3 months ago by Adgower
{{Carbon\Carbon::parse($events->first()->start_date)->diffForHumans()}}

Returns 4 hours from now.

The value is

2020-07-13 08:00:00

and current time on is 2020-07-12 22:42

I would like it to return "tomorrow" or even better would be ~9 hrs

Please sign in or create an account to participate in this conversation.