summaryrefslogtreecommitdiff
path: root/framework/Util
diff options
context:
space:
mode:
authorknut <>2008-08-06 01:34:06 +0000
committerknut <>2008-08-06 01:34:06 +0000
commitf7f3d150ef35c026bf6aee72e78362e263419e1a (patch)
tree6e060c20928f46a801e2087459a10958bf529685 /framework/Util
parent637d5678be83c5fae1b21848d53e4d90bd5c0b0d (diff)
fixed #898
Diffstat (limited to 'framework/Util')
-rw-r--r--framework/Util/TDateTimeStamp.php10
-rw-r--r--framework/Util/TSimpleDateFormatter.php8
2 files changed, 9 insertions, 9 deletions
diff --git a/framework/Util/TDateTimeStamp.php b/framework/Util/TDateTimeStamp.php
index c2fb1327..07466462 100644
--- a/framework/Util/TDateTimeStamp.php
+++ b/framework/Util/TDateTimeStamp.php
@@ -9,7 +9,7 @@
*
* @author Wei Zhuo <weizhuo[at]gamil[dot]com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2008 PradoSoft
+ * @copyright Copyright &copy; 2005-2008 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Util
@@ -619,9 +619,9 @@ class TDateTimeStamp
$min = intval($min);
$sec = intval($sec);
*/
- $mon = intval($mon);
- $day = intval($day);
- $year = intval($year);
+ $mon = (int)$mon;
+ $day = (int)$day;
+ $year = (int)$year;
$year = $this->digitCheck($year);
@@ -700,4 +700,4 @@ class TDateTimeStamp
}
}
-?>
+?>
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);