Class CalendarUtil

java.lang.Object
com.ibm.icu.impl.CalendarUtil

public final class CalendarUtil extends Object
Calendar utilities. Date/time format service classes in com.ibm.icu.text packages sometimes need to access calendar internal APIs. But calendar classes are in com.ibm.icu.util package, so the package local cannot be used. This class is added in com.ibm.icu.impl package for sharing some calendar internal code for calendar and date format.
  • Field Details

  • Constructor Details

    • CalendarUtil

      public CalendarUtil()
  • Method Details

    • getCalendarType

      public static String getCalendarType(ULocale loc)
      Returns a calendar type for the given locale. When the given locale has calendar keyword, the value of calendar keyword is returned. Otherwise, the default calendar type for the locale is returned.
      Parameters:
      loc - The locale
      Returns:
      Calendar type string, such as "gregorian"