예제 #1
0
  @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);
  }
예제 #2
0
  private static char toChar(DisplayMode mode) {

    return Character.toLowerCase(mode.name().charAt(0));
  }