Files
citrus-cms/app/Functions/rejected-date.php
T
2026-04-28 21:14:25 +03:00

17 lines
523 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php function rejected_date($date) {
$rejectedDate = [null, "0000-00-00", "", "1970-01-01", "0000-11-30"];
$currentYear = date("Y");
$dateYear = date("Y", strtotime($date));
$differentYear = $currentYear - $dateYear;
if(in_array($date, $rejectedDate)) {
return true;
} else {
if($differentYear > -20 && $differentYear < 100) { //mevcut yıldan 2 yıl eksiğine ait kayda izin ver
return false;
} else {
return true;
}
}
} ?>