From 55b1086851ec8548cc1ed5a3295d95a49d73ce4c Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sun, 3 May 2009 23:33:54 -0400 Subject: [PATCH] fix dealiasAndDisambiguateTimes --- framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php b/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php index a9029b86d..ca9cb3682 100644 --- a/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php +++ b/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php @@ -600,14 +600,14 @@ class Horde_Date_Parser_Locale_Base } } - if ($dayPortionIndex && $timeIndex) { + if ($dayPortionIndex !== null && $timeIndex !== null) { $t1 = $tokens[$dayPortionIndex]; $t1tag = $t1->getTag('repeater_day_portion'); - if ($t1tag == 'morning') { + if ($t1tag->type == 'morning') { $t1->untag('repeater_day_portion'); $t1->tag('repeater_day_portion', new Horde_Date_Repeater_DayPortion('am')); - } elseif (in_array($t1tag, array('afternoon', 'evening', 'night'))) { + } elseif (in_array($t1tag->type, array('afternoon', 'evening', 'night'))) { $t1->untag('repeater_day_portion'); $t1->tag('repeater_day_portion', new Horde_Date_Repeater_DayPortion('pm')); } -- 2.11.0