Class CalendarUtil


  • public final class CalendarUtil
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String CALKEY  
      private static java.lang.String DEFCAL  
    • Constructor Summary

      Constructors 
      Constructor Description
      CalendarUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getCalendarType​(ULocale loc)
      Returns a calendar type for the given locale.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CalendarUtil

        public CalendarUtil()
    • Method Detail

      • getCalendarType

        public static java.lang.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"