Class DateFormatSymbols

java.lang.Object
com.codename1.l10n.DateFormatSymbols
All Implemented Interfaces:
Cloneable

public class DateFormatSymbols extends Object implements Cloneable
  • Field Details

  • Constructor Details

    • DateFormatSymbols

      public DateFormatSymbols()
  • Method Details

    • getAmPmStrings

      public String[] getAmPmStrings()
    • setAmPmStrings

      public void setAmPmStrings(String[] newAmpms)
    • getResourceBundle

      public Hashtable<String,String> getResourceBundle()
    • setResourceBundle

      public void setResourceBundle(Hashtable<String,String> newResourceBundle)
    • getZoneStrings

      public String[][] getZoneStrings()
    • setZoneStrings

      public void setZoneStrings(String[][] newZoneStrings)
    • addZoneMapping

      public void addZoneMapping(String zoneId, String longName, String longNameDST, String shortName, String shortNameDST)

      Adds a timezone mapping so that SimpleDateFormat can recognize abbreviated timezones.

      Parameters
      • zoneId: The TimeZone ID. E.g. America/New_York

      • longName: The long name of the mapping. E.g. Eastern Standard Time

      • longNameDST: The long name of the mapping in daylight saving time. E.g. Eastern Daylight Time

      • shortName: The short name of the mapping. E.g. EST

      • shortNameDST: The short name of the mapping in daylight saving time. E.g. EDT

    • getZoneShortName

      public String getZoneShortName(String zoneId, String defaultValue)

      Gets the short name of a given timezone.

      Parameters
      • zoneId: The timezone ID. E.g. America/Vancouver

      • defaultValue: A default value if no mapping is found.

      Returns

      The short name of the timezone. E.g. PST

    • getZoneShortNameDST

      public String getZoneShortNameDST(String zoneId, String defaultValue)

      Gets the short name of a given timezone in daylight saving time.

      Parameters
      • zoneId: The timezone ID. E.g. America/Vancouver

      • defaultValue: A default value if no mapping is found.

      Returns

      The short name of the timezone in daylight saving time. E.g. PDT

    • getZoneLongName

      public String getZoneLongName(String zoneId, String defaultValue)

      Gets the long name of a given timezone.

      Parameters
      • zoneId: The timezone ID. E.g. America/Vancouver

      • defaultValue: A default value if no mapping is found.

      Returns

      The short name of the timezone. E.g. Pacific Standard Time

    • getZoneLongNameDST

      public String getZoneLongNameDST(String zoneId, String defaultValue)

      Gets the long name of a given timezone in daylight saving time.

      Parameters
      • zoneId: The timezone ID. E.g. America/Vancouver

      • defaultValue: A default value if no mapping is found.

      Returns

      The short name of the timezone. E.g. Pacific Daylight Time

    • getShortWeekdays

      public String[] getShortWeekdays()
    • setShortWeekdays

      public void setShortWeekdays(String[] newShortWeekdays)
    • getWeekdays

      public String[] getWeekdays()
    • setWeekdays

      public void setWeekdays(String[] newWeekdays)
    • getShortMonths

      public String[] getShortMonths()
    • setShortMonths

      public void setShortMonths(String[] newShortMonths)
    • getMonths

      public String[] getMonths()
    • setMonths

      public void setMonths(String[] newMonths)
    • getEras

      public String[] getEras()
    • setEras

      public void setEras(String[] newEras)
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • isLocalized

      public boolean isLocalized()

      Allows turning localization on/off defaults to localization

      Returns

      the localized

    • setLocalized

      public void setLocalized(boolean localized)

      Allows turning localization on/off defaults to localization

      Parameters
      • localized: the localized to set