diff options
author | knut <> | 2008-08-06 01:34:06 +0000 |
---|---|---|
committer | knut <> | 2008-08-06 01:34:06 +0000 |
commit | f7f3d150ef35c026bf6aee72e78362e263419e1a (patch) | |
tree | 6e060c20928f46a801e2087459a10958bf529685 /framework/Util/TSimpleDateFormatter.php | |
parent | 637d5678be83c5fae1b21848d53e4d90bd5c0b0d (diff) |
fixed #898
Diffstat (limited to 'framework/Util/TSimpleDateFormatter.php')
-rw-r--r-- | framework/Util/TSimpleDateFormatter.php | 8 |
1 files changed, 4 insertions, 4 deletions
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);
|