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