Revert/optimize some changes from 773ccc318f2769c9b7579630569b5d8ba47b114b and d261b1e89c3d4d5191036d5a5660ef6764e593a0
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index 0bda333..c601dc9 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -285,7 +285,7 @@
 			$year = date('Y');
 		}
 
-		if ($month === 2)
+		if ($month == 2)
 		{
 			if ($year % 400 === 0 OR ($year % 4 === 0 && $year % 100 !== 0))
 			{
@@ -472,9 +472,9 @@
 		$hour = (strlen($ex[0]) === 1) ? '0'.$ex[0] : $ex[0];
 		$min  = (strlen($ex[1]) === 1) ? '0'.$ex[1] : $ex[1];
 
-		if (isset($ex['2']) && preg_match('/[0-9]{1,2}/', $ex[2]))
+		if (isset($ex[2]) && preg_match('/[0-9]{1,2}/', $ex[2]))
 		{
-			$sec  = (strlen($ex[2]) === 1) ? '0'.$ex[2] : $ex[2];
+			$sec = (strlen($ex[2]) === 1) ? '0'.$ex[2] : $ex[2];
 		}
 		else
 		{
@@ -482,7 +482,7 @@
 			$sec = '00';
 		}
 
-		if (isset($split['2']))
+		if (isset($split[2]))
 		{
 			$ampm = strtolower($split[2]);
 
@@ -491,7 +491,7 @@
 				$hour += 12;
 			}
 
-			if (substr($ampm, 0, 1) === 'a' && $hour === 12)
+			if (substr($ampm, 0, 1) === 'a' && $hour == 12)
 			{
 				$hour =  '00';
 			}