Class DateTimeFormatOptions

    • Constructor Detail

      • DateTimeFormatOptions

        public DateTimeFormatOptions()
        Creates new number format options object.
    • Method Detail

      • setDateStyle

        public void setDateStyle​(DateTimeStyle style)
        Sets the date formatting style to use when calling AbstractFormat.format(java.lang.Object).
        dateStyle can be used with timeStyle, but not with other options (e.g. weekday, hour, month, etc.).
        Parameters:
        style - the date formatting style
      • setTimeStyle

        public void setTimeStyle​(DateTimeStyle style)
        Sets the time formatting style to use when calling AbstractFormat.format(java.lang.Object). timeStyle can be used with dateStyle, but not with other options (e.g. weekday, hour, month, etc.).
        Parameters:
        style - the time formatting style
      • setCalendar

        public void setCalendar​(Calendar calendar)
        Sets the calendar to use.
        Parameters:
        calendar - the calendar to use
      • setDayPeriod

        public void setDayPeriod​(StringItemStyle dayPeriod)
        Sets the way day periods should be expressed.
        Parameters:
        dayPeriod - the way day periods should be expressed
      • setTimeZone

        public void setTimeZone​(TimeZone zone)
        Sets the time zone to use.
        Parameters:
        zone - the time zone to use
      • setHour12

        public void setHour12​(boolean hour12)
        Sets whether to use 12-hour time (as opposed to 24-hour time).
        Parameters:
        hour12 - whether to use 12-hour time (as opposed to 24-hour time)
      • isHour12

        public boolean isHour12()
        Returns whether to use 12-hour time (as opposed to 24-hour time).
        Specified by:
        isHour12 in interface IsDefaultDateTimeFormatOptions
        Returns:
        whether to use 12-hour time (as opposed to 24-hour time)
      • setHourCycle

        public void setHourCycle​(HourCycle hourCycle)
        Sets the hour cycle to use.
        The setHour12(boolean) option takes precedence in case both options have been specified.
        Parameters:
        hourCycle - the hour cycle to use
      • setFormatMatcher

        public void setFormatMatcher​(FormatMatcher format)
        Sets the format matching algorithm to use.
        Parameters:
        format - the format matching algorithm to use
      • setWeekDay

        public void setWeekDay​(StringItemStyle style)
        Sets the representation of the WeekDay.
        Parameters:
        style - the representation of the WeekDay
      • setEra

        public void setEra​(StringItemStyle style)
        Sets the representation of the Era.
        Parameters:
        style - the representation of the Era
      • setYear

        public void setYear​(NumberItemStyle style)
        Sets the representation of the Year.
        Parameters:
        style - the representation of the Year
      • setMonth

        public void setMonth​(MixedItemStyle style)
        Sets the representation of the Month.
        Parameters:
        style - the representation of the Month
      • setDay

        public void setDay​(NumberItemStyle style)
        Sets the representation of the Day.
        Parameters:
        style - the representation of the Day
      • setHour

        public void setHour​(NumberItemStyle style)
        Sets the representation of the Hour.
        Parameters:
        style - the representation of the Hour
      • setMinute

        public void setMinute​(NumberItemStyle style)
        Sets the representation of the Minute.
        Parameters:
        style - the representation of the Minute
      • setSecond

        public void setSecond​(NumberItemStyle style)
        Sets the representation of the Second.
        Parameters:
        style - the representation of the Second
      • setTimeZoneName

        public void setTimeZoneName​(TimeZoneName timeZoneName)
        Sets the representation of the time zone name.
        Parameters:
        timeZoneName - the representation of the time zone name
      • getDefaultValues

        protected final D getDefaultValues()
        Returns:
        the defaultValues
      • setLocaleMatcher

        public final void setLocaleMatcher​(LocaleMatcher localeMatcher)
        Sets the locale matching algorithm to use.
        Parameters:
        localeMatcher - the locale matching algorithm to use
      • setNumberingSystem

        public final void setNumberingSystem​(NumberingSystem numberingSystem)
        Sets the numbering system to use.
        Parameters:
        numberingSystem - the numbering system to use