summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class5
1 files changed, 4 insertions, 1 deletions
diff --git a/it.class b/it.class
index 3f9ccf0..bc5e94e 100644
--- a/it.class
+++ b/it.class
@@ -723,7 +723,10 @@ static function gets()
*/
static function date($format = "", $stamp = null)
{
- $stamp = !isset($stamp) ? time() : (it::match('^\d+$', $stamp) ? $stamp : strtotime($stamp));
+ if (!isset($stamp))
+ $stamp = time();
+ else if(!is_int($stamp) && !ctype_digit($stamp) && (!is_float($stamp) || strstr($stamp, '.')))
+ $stamp = strtotime($stamp);
list($name, $language) = explode(":", $format);