<?php

namespace App\Helpers;

use Carbon\Carbon;

class DiffDateTimeHelper
{

    public static function calculateDaysDifference($startDate, $endDate)
    {
        // Créer des instances de Carbon à partir des dates fournies
        $startDateTime = Carbon::parse($startDate);
        $endDateTime = Carbon::parse($endDate);

        // Calculer la différence en jours
        $daysDifference = $endDateTime->diffInDays($startDateTime);

        return $daysDifference;
    }
}
