Class ExtraDateStrings

java.lang.Object
com.github.lgooddatepicker.zinternaltools.ExtraDateStrings

public class ExtraDateStrings extends Object
ExtraDateStrings, This class holds extra date strings. This includes: # Formats for parsing dates in a particular language. # Overridden month names for particular locales. All the fields and functions are static.
  • Field Details

    • monthsNamesForLanguage_ru

      public static final String[] monthsNamesForLanguage_ru
      monthsNamesForLanguage_ru, This is a constant list of "standalone" month names, for the Russian locale. This was previously used to supply the Russian month names, but now that this class has a generalized solution for getting the standalone month names in all languages, this array should only be used for visual reference. This can be used for comparison to ensure that the general solution is functioning correctly.
  • Constructor Details

    • ExtraDateStrings

      public ExtraDateStrings()
  • Method Details

    • getExtraParsingFormatsForLocale

      public static ArrayList<DateTimeFormatter> getExtraParsingFormatsForLocale(Locale locale)
      getExtraParsingFormatsForLocale, This will return a list of extra parsing formatters for the specified locale. If no extra formatters are found, then this will return an empty list. (This will never return null.)
    • getDefaultStandaloneLongMonthNamesForLocale

      public static String[] getDefaultStandaloneLongMonthNamesForLocale(Locale locale)
      getDefaultStandaloneLongMonthNamesForLocale, This will return a list of capitalized, translated, standalone month names for the specified locale. This function will always return a list with 12 elements, and each element will always contain a string. This will never return a null array, or any null elements. Implementation note: it was previously required to override the month names in certain languages such as Russian, to get the proper grammar. At this point, a generalized solution has been implemented for all languages. It is assumed that this solution is working correctly, unless and until someone reports that it is not working correctly for their language.
    • getDefaultStandaloneShortMonthNamesForLocale

      public static String[] getDefaultStandaloneShortMonthNamesForLocale(Locale locale)
    • getFormattingMonthNamesArray

      public static String[] getFormattingMonthNamesArray(Locale locale, boolean capitalize, boolean shortVersion)
      getFormattingMonthNamesArray, This returns an array with the translated, formatting version of the month names for the specified locale. (The "formatting version" of the month names can be different from the standalone version in some locales, including Russian and Czech. The formatting version would be used in a formatted date, and the standalone version would be used if the month is being specified by itself.) capitalize: This specifies whether the month name should be capitalized or not capitalized. shortVersion: This specifies whether the month names should be the short, or long versions of the formatting month names.