I want to not include the penalties from Sunday , only Monday - Saturday only using this borrowdate,returndate, and currentdate Thankyou!
$borrowdate = new Datetime($row['date_return']);
$returndate = new Datetime($row['due_date']);
$currentdate = new Datetime();
$fines = 0;
if($currentdate > $returndate){
$days = $borrowdate->diff($returndate ?? $currentdate, true)->days;
echo "₱ ". $fines = $days > 0 ? intval(floor($days)) * 15 : 0;
$fi = $row['borrow_details_id'];
mysqli_query($dbcon,"update borrowdetails set fines='$fines' where borrow_details_id = '$fi'");
}