summaryrefslogtreecommitdiff
path: root/framework/Util/TSimpleDateFormatter.php
diff options
context:
space:
mode:
authorxue <>2006-08-02 02:24:29 +0000
committerxue <>2006-08-02 02:24:29 +0000
commit550ba06593b467b643862d41a00ca2dd12ee704b (patch)
tree16ad8180c2f0b96454453effff89dc236469ee4f /framework/Util/TSimpleDateFormatter.php
parentccfa7850dc435ae9941cde18be827b3aac550f85 (diff)
merge from 3.0 branch till 1320.
Diffstat (limited to 'framework/Util/TSimpleDateFormatter.php')
-rw-r--r--framework/Util/TSimpleDateFormatter.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/Util/TSimpleDateFormatter.php b/framework/Util/TSimpleDateFormatter.php
index 2a3da63a..971225b5 100644
--- a/framework/Util/TSimpleDateFormatter.php
+++ b/framework/Util/TSimpleDateFormatter.php
@@ -294,11 +294,14 @@ class TSimpleDateFormatter
}
if ($i_val != $this->length($value))
throw new TInvalidDataValueException("Pattern '{$this->pattern}' mismatch", $value);
-
+ //var_dump('month is '.$month);
if(!$defaultToCurrentTime && (is_null($month) || is_null($day) || is_null($year)))
return null;
else
+ {
+ $day = intval($day) <= 0 ? 1 : intval($day);
return @mktime(0, 0, 0, $month, $day, $year);
+ }
}
/**