private static final Pattern date_ptrn5 = Pattern.compile("^\\[DBNum([123])]");
private static final DateTimeFormatter dateTimeFormats = new DateTimeFormatterBuilder()
- .appendPattern("[dd MMM[ yyyy]][[ ]h:m[:s] a][[ ]H:m[:s]]")
- .appendPattern("[[yyyy ]dd-MMM[-yyyy]][[ ]h:m[:s] a][[ ]H:m[:s]]")
- .appendPattern("[M/dd[/yyyy]][[ ]h:m[:s] a][[ ]H:m[:s]]")
- .appendPattern("[[yyyy/]M/dd][[ ]h:m[:s] a][[ ]H:m[:s]]")
+ .appendPattern("[dd MMM[ yyyy]][[ ]h:m[:s][.SSS] a][[ ]H:m[:s][.SSS]]")
+ .appendPattern("[[yyyy ]dd-MMM[-yyyy]][[ ]h:m[:s][.SSS] a][[ ]H:m[:s][.SSS]]")
+ .appendPattern("[M/dd[/yyyy]][[ ]h:m[:s][.SSS] a][[ ]H:m[:s][.SSS]]")
+ .appendPattern("[[yyyy/]M/dd][[ ]h:m[:s][.SSS] a][[ ]H:m[:s][.SSS]]")
.parseDefaulting(ChronoField.YEAR_OF_ERA, LocaleUtil.getLocaleCalendar().get(Calendar.YEAR))
.toFormatter();
confirmTimeValue(new StringEval("12:00"), 0.5); // Serial number of a time entered as text.
confirmTimeValue(new StringEval("6:00 PM"), 0.75); // Serial number of a time entered as text.
confirmTimeValue(new StringEval("12:03:45"), 0.5026041666642413); // Serial number of a time entered as text.
+
+ // this is not yet right as the milliseconds are not counted - but this used to cause a parse issue before
+ confirmTimeValue(new StringEval("12:03:45.386"), 0.5026041666642413);
} finally {
LocaleUtil.setUserLocale(null);
}