add '/' to auto detection of dates

This commit is contained in:
kimchy 2010-05-04 15:26:59 +03:00
parent 7d9f55309e
commit 24ccd73c5d
1 changed files with 1 additions and 1 deletions

View File

@ -410,7 +410,7 @@ public class XContentObjectMapper implements XContentMapper, XContentIncludeInAl
// check if it fits one of the date formats // check if it fits one of the date formats
boolean isDate = false; boolean isDate = false;
// a safe check since "1" gets parsed as well // a safe check since "1" gets parsed as well
if (text.contains(":") || text.contains("-")) { if (text.contains(":") || text.contains("-") || text.contains("/")) {
for (FormatDateTimeFormatter dateTimeFormatter : dateTimeFormatters) { for (FormatDateTimeFormatter dateTimeFormatter : dateTimeFormatters) {
try { try {
dateTimeFormatter.parser().parseMillis(text); dateTimeFormatter.parser().parseMillis(text);