Answers for "how to calculate number of years between two dates in laravel with carbon"

PHP
1

different days in carbon laravel between different dates

$created = new Carbon($survey->created_at);
$now = Carbon::now();
$difference = ($created->diff($now)->days < 1)
    ? 'today'
    : $created->diffForHumans($now);
Posted by: Guest on February-03-2021
0

total days between two dates carbon

$startdate->diffInDays($todate); //total days between two dates
$startdate->diffInMinutes($todate); //total number of minutes between two dates
$startdate->diffInMonths($todate); //total number of months difference
Posted by: Guest on September-03-2021

Code answers related to "how to calculate number of years between two dates in laravel with carbon"

Browse Popular Code Answers by Language