use of org.jkiss.utils.time.ExtendedDateFormat in project dbeaver by serge-rider.
the class DateTimeDataFormatter method init.
@Override
public void init(Locale locale, Map<Object, Object> properties) {
pattern = CommonUtils.toString(properties.get(PROP_PATTERN));
dateFormat = new ExtendedDateFormat(pattern, locale);
buffer = new StringBuffer();
position = new FieldPosition(0);
}
use of org.jkiss.utils.time.ExtendedDateFormat in project dbeaver by dbeaver.
the class DateTimeDataFormatter method init.
@Override
public void init(DBSTypedObject type, Locale locale, Map<Object, Object> properties) {
pattern = CommonUtils.toString(properties.get(PROP_PATTERN));
dateFormat = new ExtendedDateFormat(pattern, locale);
buffer = new StringBuffer();
position = new FieldPosition(0);
}
use of org.jkiss.utils.time.ExtendedDateFormat in project dbeaver by serge-rider.
the class DateTimeDataFormatter method init.
@Override
public void init(DBSTypedObject type, Locale locale, Map<String, Object> properties) {
pattern = CommonUtils.toString(properties.get(PROP_PATTERN));
dateFormat = new ExtendedDateFormat(pattern, locale);
// We shouldn't use lanient formatter (#7244)
dateFormat.setLenient(false);
buffer = new StringBuffer();
position = new FieldPosition(0);
// DateTimeFormatter pattern for nanoseconds is "n" but old "f" (ExtendedDateFormat)
String java8DatePattern = pattern.replaceAll("f+", "n");
dateTimeFormatter = DateTimeFormatter.ofPattern(java8DatePattern);
}
Aggregations