Pass locale when creating date parser.
authorJan Schneider <jan@horde.org>
Mon, 17 May 2010 23:33:58 +0000 (01:33 +0200)
committerJan Schneider <jan@horde.org>
Mon, 17 May 2010 23:35:44 +0000 (01:35 +0200)
kronolith/lib/Kronolith.php

index 054bba2..e5800f3 100644 (file)
@@ -897,7 +897,7 @@ class Kronolith
         $title = trim($title);
         $description = trim($description);
 
-        $dateParser = Horde_Date_Parser::factory();
+        $dateParser = Horde_Date_Parser::factory(array('locale' => $GLOBALS['language']));
         $r = $dateParser->parse($title, array('return' => 'result'));
         if (!($d = $r->guess())) {
             throw new Horde_Exception(sprintf(_("Cannot parse event description \"%s\""), Horde_String::truncate($text)));