}
return dateFormat;
}
protected DateFormat getDateFormat(Locale locale) {
DateFormat dateFormat = null;
if (this.variant.equals(DATE)) {
dateFormat = I18nSupport.getInstance().getDateFormat(style, locale);
} else if (this.variant.equals(TIME)) {
dateFormat = I18nSupport.getInstance().getTimeFormat(style, locale);
} else if (this.variant.equals(DATE_TIME)) {
dateFormat = I18nSupport.getInstance().getDateTimeFormat(style, style, locale);
}
String pattern = (String)localizedPatterns.get(locale);
if (pattern != null)
dateFormat.applyLocalizedPattern(pattern);
else if (nonLocalizedPattern != null)
dateFormat.applyPattern(nonLocalizedPattern);
return dateFormat;
}