summaryrefslogtreecommitdiffstats
path: root/system/helpers/date_helper.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-04 14:34:56 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-04 14:34:56 +0200
commit5036c9caabb12f90b9533d7fb417610e02a652ff (patch)
treeff5fd9f6a0932e4d537482fd3ec5a3652188a950 /system/helpers/date_helper.php
parente4c30195c5f6dc7a144cfe4ee160b18626626612 (diff)
Diffstat (limited to 'system/helpers/date_helper.php')
-rw-r--r--system/helpers/date_helper.php10
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';
}