From 5036c9caabb12f90b9533d7fb417610e02a652ff Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 4 Jun 2012 15:34:56 +0300 Subject: Revert/optimize some changes from 773ccc318f2769c9b7579630569b5d8ba47b114b and d261b1e89c3d4d5191036d5a5660ef6764e593a0 --- system/helpers/date_helper.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'system/helpers') 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'; } -- cgit v1.2.3-24-g4f1b