Log 2473
02/01/2024 2024-01-02 0:59$dateEntry = “10/10/2023”;
$daysToCredit = 20;
$dailyCost = 50;
$dateCancellation = “12/11/2023”;
list($dayEntry, $monthEntry, $yearEntry) = explode(‘/’, $dateEntry);
list($dayCancellation, $monthCancellation, $yearCancellation) = explode(‘/’, $dateCancellation);
if ($yearEntry < 2023 || ($yearEntry == 2023 && ($monthEntry < 11 || ($monthEntry == 11 && $dayEntry 2023 || ($yearCancellation == 2023 && ($monthCancellation > 11 || ($monthCancellation == 11 && $dayCancellation >= 10)))) {
return $daysToCredit * $dailyCost;
} else {
return “0”;
}
} else {
return “0”;
}