Log 2735
06/02/2024 2024-02-06 12:43$purchaseDate = #תאריך רכישה#;
$year = “”;
if (strpos($purchaseDate, “/”) !== false) {
$dateParts = explode(“/”, $purchaseDate);
if (count($dateParts) === 3 && is_numeric($dateParts[0]) && is_numeric($dateParts[1]) && is_numeric($dateParts[2])) {
$year = date(“Y”, strtotime($purchaseDate));
}
}
return $year;