From 0652722cae0a27b3e8347b61ddb608ac6fb1ff19 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 17 Jan 2009 15:22:28 +0000 Subject: [PATCH] Two minor tweaks: allow one to specify jan1, and parse for jan1 before looking for j (julian abbreviation) svn: r11645 --- src/DateHandler/_DateParser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DateHandler/_DateParser.py b/src/DateHandler/_DateParser.py index 99f32906d..89416950e 100644 --- a/src/DateHandler/_DateParser.py +++ b/src/DateHandler/_DateParser.py @@ -175,6 +175,7 @@ class DateParser: } newyear_to_int = { + "jan1": Date.NEWYEAR_JAN1, "mar1": Date.NEWYEAR_MAR1, "mar25": Date.NEWYEAR_MAR25, "sep1" : Date.NEWYEAR_SEP1, @@ -616,8 +617,8 @@ class DateParser: newyear = Date.NEWYEAR_JAN1 (text, cal, newyear) = self.match_calendar_newyear(text, cal, newyear) - (text, cal) = self.match_calendar(text, cal) (text, newyear) = self.match_newyear(text, newyear) + (text, cal) = self.match_calendar(text, cal) (text, qual) = self.match_quality(text, qual) if self.match_span(text, cal, newyear, qual, date):