Index: QueryParser.jj =================================================================== RCS file: /home/cvspublic/jakarta-lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj,v retrieving revision 1.39 diff -u -r1.39 QueryParser.jj --- QueryParser.jj 26 Jan 2004 18:53:14 -0000 1.39 +++ QueryParser.jj 14 Feb 2004 07:13:53 -0000 @@ -71,6 +71,7 @@ import org.apache.lucene.analysis.*; import org.apache.lucene.document.*; import org.apache.lucene.search.*; +import org.apache.lucene.util.SmartDateFormat; /** * This class is generated by JavaCC. The only method that clients should need @@ -333,12 +334,11 @@ boolean inclusive) throws ParseException { try { - DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale); - df.setLenient(true); - Date d1 = df.parse(part1); - Date d2 = df.parse(part2); + SmartDateFormat sd = new SmartDateFormat(locale); + Date d1 = sd.parse(part1); + Date d2 = sd.parse(part2); part1 = DateField.dateToString(d1); - part2 = DateField.dateToString(d2); + part2 = DateField.dateToString(d2); } catch (Exception e) { }