diff options
author | ctrlaltca <> | 2013-01-06 23:16:23 +0000 |
---|---|---|
committer | ctrlaltca <> | 2013-01-06 23:16:23 +0000 |
commit | 57311df5b3b0ae9db1fffb7cacfad57f65abd7fe (patch) | |
tree | 31f081f407b3aac5be97e0089e19b4beb6264726 /framework/Util/TSimpleDateFormatter.php | |
parent | 11d9e3f39458c4870ca722ba1d3db0d5bba754dc (diff) |
fix date validators
Diffstat (limited to 'framework/Util/TSimpleDateFormatter.php')
-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 a1a1842a..c2fe99b0 100644 --- a/framework/Util/TSimpleDateFormatter.php +++ b/framework/Util/TSimpleDateFormatter.php @@ -174,7 +174,10 @@ class TSimpleDateFormatter private function getDate($value) { $s = Prado::createComponent('System.Util.TDateTimeStamp'); - return $s->parseDate($value); + if(is_numeric($value)) + return $s->getDate($value); + else + return $s->parseDate($value); } /** |