// set with rounding
DateFieldParser fieldParser = dateFieldParsers.get(sInterval.substring(0, index));
if (fieldParser == null) {
throw new FacetPhaseExecutionException(facetName, "failed to parse interval [" + sInterval + "] with custom rounding using built in intervals (year/month/...)");
}
DateTimeField field = fieldParser.parse(dateTime.getChronology());
int rounding = this.rounding.get(sInterval.substring(index + 1));
if (rounding == -1) {
throw new FacetPhaseExecutionException(facetName, "failed to parse interval [" + sInterval + "], rounding type [" + (sInterval.substring(index + 1)) + "] not found");
}
dateTime.setRounding(field, rounding);
} else {
DateFieldParser fieldParser = dateFieldParsers.get(sInterval);
if (fieldParser != null) {
DateTimeField field = fieldParser.parse(dateTime.getChronology());
dateTime.setRounding(field, MutableDateTime.ROUND_FLOOR);
} else {
// time interval
try {
interval = TimeValue.parseTimeValue(sInterval, null).millis();