diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-04 14:34:56 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-04 14:34:56 +0200 |
commit | 5036c9caabb12f90b9533d7fb417610e02a652ff (patch) | |
tree | ff5fd9f6a0932e4d537482fd3ec5a3652188a950 /system/helpers/date_helper.php | |
parent | e4c30195c5f6dc7a144cfe4ee160b18626626612 (diff) |
Revert/optimize some changes from 773ccc318f2769c9b7579630569b5d8ba47b114b and d261b1e89c3d4d5191036d5a5660ef6764e593a0
Diffstat (limited to 'system/helpers/date_helper.php')
-rw-r--r-- | system/helpers/date_helper.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 0bda33378..c601dc9e5 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -285,7 +285,7 @@ if ( ! function_exists('days_in_month')) $year = date('Y'); } - if ($month === 2) + if ($month == 2) { if ($year % 400 === 0 OR ($year % 4 === 0 && $year % 100 !== 0)) { @@ -472,9 +472,9 @@ if ( ! function_exists('human_to_unix')) $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 @@ if ( ! function_exists('human_to_unix')) $sec = '00'; } - if (isset($split['2'])) + if (isset($split[2])) { $ampm = strtolower($split[2]); @@ -491,7 +491,7 @@ if ( ! function_exists('human_to_unix')) $hour += 12; } - if (substr($ampm, 0, 1) === 'a' && $hour === 12) + if (substr($ampm, 0, 1) === 'a' && $hour == 12) { $hour = '00'; } |