*/
public DateConverter(
final String defaultEraFormat, final String defaultFormat, final String[] acceptableFormats,
final Locale locale, final TimeZone timeZone, final boolean lenient) {
if (defaultEraFormat != null) {
this.defaultEraFormat = new ThreadSafeSimpleDateFormat(defaultEraFormat, timeZone, locale, 4, 20, lenient);
} else {
this.defaultEraFormat = null;
}
this.defaultFormat = new ThreadSafeSimpleDateFormat(defaultFormat, timeZone, locale, 4, 20, lenient);
this.acceptableFormats = acceptableFormats != null
? new ThreadSafeSimpleDateFormat[acceptableFormats.length]
: new ThreadSafeSimpleDateFormat[0];
for (int i = 0; i < this.acceptableFormats.length; i++) {
this.acceptableFormats[i] = new ThreadSafeSimpleDateFormat(acceptableFormats[i], timeZone, locale, 1, 20,
lenient);
}
}