don't cast scalars; Horde_Date can use the fact that they're strings to do some corre...
authorChuck Hagenbuch <chuck@horde.org>
Thu, 21 May 2009 00:49:42 +0000 (20:49 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Fri, 22 May 2009 15:57:28 +0000 (11:57 -0400)
framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base/Scalar.php

index 0130dc3..d74236a 100644 (file)
@@ -31,7 +31,7 @@ class Horde_Date_Parser_Locale_Base_Scalar
     {
         if (preg_match($this->scalarRegex, $token->word)) {
             if (!in_array($postToken, $this->timeSignifiers)) {
-                return (int)$token->word;
+                return $token->word;
             }
         }
     }
@@ -39,8 +39,8 @@ class Horde_Date_Parser_Locale_Base_Scalar
     public function scanForDays($token, $postToken)
     {
         if (preg_match($this->dayRegex, $token->word)) {
-            if ((int)$token->word <= 31 && !in_array($postToken, $this->timeSignifiers)) {
-                return (int)$token->word;
+            if ($token->word <= 31 && !in_array($postToken, $this->timeSignifiers)) {
+                return $token->word;
             }
         }
     }
@@ -48,8 +48,8 @@ class Horde_Date_Parser_Locale_Base_Scalar
     public function scanForMonths($token, $postToken)
     {
         if (preg_match($this->monthRegex, $token->word)) {
-            if ((int)$token->word <= 12 && !in_array($postToken, $this->timeSignifiers)) {
-                return (int)$token->word;
+            if ($token->word <= 12 && !in_array($postToken, $this->timeSignifiers)) {
+                return $token->word;
             }
         }
     }
@@ -58,7 +58,7 @@ class Horde_Date_Parser_Locale_Base_Scalar
     {
         if (preg_match($this->yearRegex, $token->word)) {
             if (!in_array($postToken, $this->timeSignifiers)) {
-                return (int)$token->word;
+                return $token->word;
             }
         }
     }