From f7f3d150ef35c026bf6aee72e78362e263419e1a Mon Sep 17 00:00:00 2001 From: knut <> Date: Wed, 6 Aug 2008 01:34:06 +0000 Subject: fixed #898 --- framework/Util/TSimpleDateFormatter.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'framework/Util/TSimpleDateFormatter.php') diff --git a/framework/Util/TSimpleDateFormatter.php b/framework/Util/TSimpleDateFormatter.php index d0ed4496..07a59398 100644 --- a/framework/Util/TSimpleDateFormatter.php +++ b/framework/Util/TSimpleDateFormatter.php @@ -261,19 +261,19 @@ class TSimpleDateFormatter $i_val += strlen($year); if(strlen($year) == 2) { - $iYear = intval($year); + $iYear = (int)$year; if($iYear > 70) $year = $iYear + 1900; else $year = $iYear + 2000; } - $year = intval($year); + $year = (int)$year; } elseif($token=='MM' || $token=='M') { $month=$this->getInteger($value,$i_val, $this->length($token),2); - $iMonth = intval($month); + $iMonth = (int)$month; if($month === null || $iMonth < 1 || $iMonth > 12 ) return null; //throw new TInvalidDataValueException('Invalid month', $value); @@ -284,7 +284,7 @@ class TSimpleDateFormatter { $day = $this->getInteger($value,$i_val, $this->length($token), 2); - $iDay = intval($day); + $iDay = (int)$day; if($day === null || $iDay < 1 || $iDay >31) return null; //throw new TInvalidDataValueException('Invalid day', $value); -- cgit v1.2.3