Package jodd.util

Examples of jodd.util.DateFormatSymbolsEx


    );
  }

  @Override
  protected String convertPattern(int patternIndex, JDateTime jdt) {
    DateFormatSymbolsEx dfs = LocaleUtil.getDateFormatSymbols(jdt.getLocale());
    switch (patternIndex) {
      case 0:
        return printPad4(jdt.getYear());
      case 1:
        return print2(jdt.getMonth());
      case 2:
        return print2(jdt.getDay());
      case 3:
        return Integer.toString(jdt.getDayOfWeek());
      case 4:
        return dfs.getMonth(jdt.getMonth() - 1);
      case 5:
        return dfs.getShortMonth(jdt.getMonth() - 1);
      case 6:
        return dfs.getWeekday((jdt.getDayOfWeek() % 7) + 1);
      case 7:
        return dfs.getShortWeekday((jdt.getDayOfWeek() % 7) + 1);
      case 8:
        return print2(jdt.getHour());
      case 9:
        return print2(jdt.getMinute());
      case 10:
        return print2(jdt.getSecond());
      case 11:
        return print3(jdt.getMillisecond());
      case 12:
        return print3(jdt.getDayOfYear());
      case 13:
        return print2(jdt.getWeekOfYear());
      case 14:
        return 'W' + print2(jdt.getWeekOfYear());
      case 15:
        return Integer.toString(jdt.getWeekOfMonth());
      case 16:
        return jdt.getEra() == 1 ? dfs.getAdEra() : dfs.getBcEra();
      case 17:
        return jdt.getTimeZone().getDisplayName(
            jdt.isInDaylightTime(),
            TimeZone.LONG,
            jdt.getLocale());
View Full Code Here

TOP

Related Classes of jodd.util.DateFormatSymbolsEx

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.