diff options
author | wei <> | 2006-08-01 00:43:51 +0000 |
---|---|---|
committer | wei <> | 2006-08-01 00:43:51 +0000 |
commit | 62274f7a89ff033a32bcd436923d39d90831f4db (patch) | |
tree | 69bfdad7b1a149b82d027030e67fe22f5f6b4a45 /framework/Util | |
parent | a87443699ef37a1815d39a69cf528c7da8a75658 (diff) |
Fixed #311
Diffstat (limited to 'framework/Util')
-rw-r--r-- | framework/Util/TSimpleDateFormatter.php | 5 |
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);
+ }
}
/**
|