@Override public String getDateTimePattern(DisplayMode dateMode, DisplayMode timeMode, Locale locale) { DisplayMode total = dateMode; if (dateMode.compareTo(timeMode) < 0) { total = timeMode; } StringBuilder sb = new StringBuilder(); sb.append("F("); sb.append(toChar(total)); sb.append(")_dt"); String key = sb.toString(); return getPatterns(locale).getString(key); }
private static char toChar(DisplayMode mode) { return Character.toLowerCase(mode.name().charAt(0)); }