From 972a342ba4c1cfff44bb87d141e0b5ba81da9af9 Mon Sep 17 00:00:00 2001 From: sawontheboss4 Date: Wed, 3 Sep 2025 20:15:36 +0600 Subject: [PATCH] 2016 --- index.php | 6 +++--- test.php | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 test.php diff --git a/index.php b/index.php index 89d7f08..95de281 100644 --- a/index.php +++ b/index.php @@ -22,12 +22,12 @@ function processInput($input) { // Step 2: Filter only 17 digits long strings if (preg_match('/^\d{17}$/', $cleanedInput)) { - // Step 3: Check if the first four digits are within 2007-2025 + // Step 3: Check if the first four digits are within 2006-2025 $firstFourDigits = substr($cleanedInput, 0, 4); - if ($firstFourDigits >= 2007 && $firstFourDigits <= 2025) { + if ($firstFourDigits >= 2006 && $firstFourDigits <= 2025) { return ['valid' => $cleanedInput]; } else { - return ['invalid' => $cleanedInput, 'reason' => 'First four digits are not within 2007-2025']; + return ['invalid' => $cleanedInput, 'reason' => 'First four digits are not within 2006-2025']; } } else { return ['invalid' => $cleanedInput, 'reason' => 'Not 17 digits long']; diff --git a/test.php b/test.php new file mode 100644 index 0000000..44f0f1c --- /dev/null +++ b/test.php @@ -0,0 +1,3 @@ + \ No newline at end of file