Package com.independentsoft.office.odf.styles

# Class DateStyle

java.lang.Object
com.independentsoft.office.odf.styles.Style
com.independentsoft.office.odf.styles.DateStyle

public class DateStyle extends Style
Represents a style for date values.

- ## Field Summary

  ### Fields inherited from class com.independentsoft.office.odf.styles.Style

  `displayName, name`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DateStyle()`
  Initializes a new instance of the DateStyle class.
  `DateStyle​(String name)`
  Initializes a new instance of the DateStyle class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DateStyle`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `AmPm`
  `getAmPm()`
  Specifies whether AM/PM is included as part of a date or time.
  `String`
  `getAmPmText()`
  Gets the am/pm text.
  `String`
  `getCountry()`
  Gets the country code for a data style.
  `Day`
  `getDay()`
  Gets the day of a month in a date.
  `DayOfWeek`
  `getDayOfWeek()`
  Gets the day of a week in a date.
  `String`
  `getDayOfWeekText()`
  Gets the day of week text.
  `String`
  `getDayText()`
  Gets the day text.
  `Era`
  `getEra()`
  Gets the era in which a year is counted.
  `String`
  `getEraText()`
  Gets the era text.
  `FormatSource`
  `getFormatSource()`
  Gets the source of definitions of the short and long display formats.
  `Hours`
  `getHours()`
  Specifies whether hours are displayed as part of a date or time.
  `String`
  `getHoursText()`
  Gets the hours text.
  `String`
  `getLanguage()`
  Gets the language code.
  `Minutes`
  `getMinutes()`
  Specifies whether minutes are displayed as part of a date or time.
  `String`
  `getMinutesText()`
  Gets the minutes text.
  `Month`
  `getMonth()`
  Gets the month in a date.
  `String`
  `getMonthText()`
  Gets the month text.
  `Quarter`
  `getQuarter()`
  Gets the quarter of the year in a date.
  `String`
  `getQuarterText()`
  Gets the quarter text.
  `Seconds`
  `getSeconds()`
  Specifies whether seconds are displayed as part of a date or time.
  `String`
  `getSecondsText()`
  Gets the seconds text.
  `List<StyleMapping>`
  `getStyleMappings()`
  Contains a collection of StyleMapping objects.
  `String`
  `getText()`
  Gets the text.
  `TextProperties`
  `getTextProperties()`
  Specifies formatting properties for text.
  `String`
  `getTitle()`
  Gets the title of a data style.
  `String`
  `getTransliterationCountry()`
  Gets the country code in conformance with [RFC5646].
  `String`
  `getTransliterationFormat()`
  Specifies which number characters to use.
  `String`
  `getTransliterationLanguage()`
  Gets the language code in conformance with [RFC5646].
  `TransliterationStyle`
  `getTransliterationStyle()`
  Gets the transliteration-format of a number system.
  `WeekOfYear`
  `getWeekOfYear()`
  Gets the week of a year in a date.
  `String`
  `getWeekOfYearText()`
  Gets the week of year text.
  `Year`
  `getYear()`
  Gets the year in a date.
  `String`
  `getYearText()`
  Gets the yer text.
  `boolean`
  `isAutoOrder()`
  Specifies whether data is ordered to match the default order for the language and country of a data style.
  `boolean`
  `isVolatile()`
  Specifies whether unused style in a document are retained or discarded by consumers.
  `void`
  `setAmPm​(AmPm amPm)`
  Specifies whether AM/PM is included as part of a date or time.
  `void`
  `setAmPmText​(String amPmText)`
  Sets the am/pm text.
  `void`
  `setAutoOrder​(boolean autoOrder)`
  Specifies whether data is ordered to match the default order for the language and country of a data style.
  `void`
  `setCountry​(String country)`
  Sets the country code for a data style.
  `void`
  `setDay​(Day day)`
  Sets the day of a month in a date.
  `void`
  `setDayOfWeek​(DayOfWeek dayOfWeek)`
  Sets the day of a week in a date.
  `void`
  `setDayOfWeekText​(String dayOfWeekText)`
  Sets the day of week text.
  `void`
  `setDayText​(String dayText)`
  Sets the day text.
  `void`
  `setEra​(Era era)`
  Sets the era in which a year is counted.
  `void`
  `setEraText​(String eraText)`
  Sets the era text.
  `void`
  `setFormatSource​(FormatSource formatSource)`
  Sets the source of definitions of the short and long display formats.
  `void`
  `setHours​(Hours hours)`
  Specifies whether hours are displayed as part of a date or time.
  `void`
  `setHoursText​(String hoursText)`
  Sets the hours text.
  `void`
  `setLanguage​(String language)`
  Sets the language code.
  `void`
  `setMinutes​(Minutes minutes)`
  Specifies whether minutes are displayed as part of a date or time.
  `void`
  `setMinutesText​(String minutesText)`
  Sets the minutes text.
  `void`
  `setMonth​(Month month)`
  Sets the month in a date.
  `void`
  `setMonthText​(String monthText)`
  Sets the month text.
  `void`
  `setQuarter​(Quarter quarter)`
  Sets the quarter of the year in a date.
  `void`
  `setQuarterText​(String quarterText)`
  Sets the quarter text.
  `void`
  `setSeconds​(Seconds seconds)`
  Specifies whether seconds are displayed as part of a date or time.
  `void`
  `setSecondsText​(String secondsText)`
  Sets the seconds text.
  `void`
  `setText​(String text)`
  Sets the text.
  `void`
  `setTitle​(String title)`
  Sets the title of a data style.
  `void`
  `setTransliterationCountry​(String transliterationCountry)`
  Sets the country code in conformance with [RFC5646].
  `void`
  `setTransliterationFormat​(String transliterationFormat)`
  Specifies which number characters to use.
  `void`
  `setTransliterationLanguage​(String transliterationLanguage)`
  Sets the language code in conformance with [RFC5646].
  `void`
  `setTransliterationStyle​(TransliterationStyle transliterationStyle)`
  Sets the transliteration-format of a number system.
  `void`
  `setVolatile​(boolean isVolatile)`
  Specifies whether unused style in a document are retained or discarded by consumers.
  `void`
  `setWeekOfYear​(WeekOfYear weekOfYear)`
  Sets the week of a year in a date.
  `void`
  `setWeekOfYearText​(String weekOfYearText)`
  Sets the week of year text.
  `void`
  `setYear​(Year year)`
  Sets the year in a date.
  `void`
  `setYearText​(String yearText)`
  Sets the year text.
  `String`
  `toString()`
  Converts the value of the current DateStyle object to its equivalent string representation.

  ### Methods inherited from class com.independentsoft.office.odf.styles.Style

  `getDisplayName, getName, setDisplayName, setName`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### DateStyle

    public DateStyle()
    Initializes a new instance of the DateStyle class.

  - ### DateStyle

    public DateStyle​(String name)
    Initializes a new instance of the DateStyle class.
    Parameters:
      `name` - the name

- ## Method Details

  - ### clone

    public DateStyle clone()
    Creates a new object that is a deep copy of the current instance.
    Specified by:
      `clone` in class `Style`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

    public String toString()
    Converts the value of the current DateStyle object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getLanguage

    public String getLanguage()
    Gets the language code.
    Returns:
      the language

  - ### setLanguage

    public void setLanguage​(String language)
    Sets the language code.
    Parameters:
      `language` - the new language

  - ### getCountry

    public String getCountry()
    Gets the country code for a data style.
    Returns:
      the country

  - ### setCountry

    public void setCountry​(String country)
    Sets the country code for a data style.
    Parameters:
      `country` - the new country

  - ### getTitle

    public String getTitle()
    Gets the title of a data style.
    Returns:
      the title

  - ### setTitle

    public void setTitle​(String title)
    Sets the title of a data style.
    Parameters:
      `title` - the new title

  - ### isVolatile

    public boolean isVolatile()
    Specifies whether unused style in a document are retained or discarded by consumers.
    Returns:
      true, if is volatile

  - ### setVolatile

    public void setVolatile​(boolean isVolatile)
    Specifies whether unused style in a document are retained or discarded by consumers.
    Parameters:
      `isVolatile` - the new volatile

  - ### isAutoOrder

    public boolean isAutoOrder()
    Specifies whether data is ordered to match the default order for the language and country of a data style.
    Returns:
      true, if is auto order

  - ### setAutoOrder

    public void setAutoOrder​(boolean autoOrder)
    Specifies whether data is ordered to match the default order for the language and country of a data style.
    Parameters:
      `autoOrder` - the new auto order

  - ### getFormatSource

    public FormatSource getFormatSource()
    Gets the source of definitions of the short and long display formats.
    Returns:
      the format source

  - ### setFormatSource

    public void setFormatSource​(FormatSource formatSource)
    Sets the source of definitions of the short and long display formats.
    Parameters:
      `formatSource` - the new format source

  - ### getTransliterationFormat

    public String getTransliterationFormat()
    Specifies which number characters to use.
    Returns:
      the transliteration format

  - ### setTransliterationFormat

    public void setTransliterationFormat​(String transliterationFormat)
    Specifies which number characters to use.
    Parameters:
      `transliterationFormat` - the new transliteration format

  - ### getTransliterationLanguage

    public String getTransliterationLanguage()
    Gets the language code in conformance with [RFC5646].
    Returns:
      the transliteration language

  - ### setTransliterationLanguage

    public void setTransliterationLanguage​(String transliterationLanguage)
    Sets the language code in conformance with [RFC5646].
    Parameters:
      `transliterationLanguage` - the new transliteration language

  - ### getTransliterationCountry

    public String getTransliterationCountry()
    Gets the country code in conformance with [RFC5646].
    Returns:
      the transliteration country

  - ### setTransliterationCountry

    public void setTransliterationCountry​(String transliterationCountry)
    Sets the country code in conformance with [RFC5646].
    Parameters:
      `transliterationCountry` - the new transliteration country

  - ### getTransliterationStyle

    public TransliterationStyle getTransliterationStyle()
    Gets the transliteration-format of a number system.
    Returns:
      the transliteration style

  - ### setTransliterationStyle

    public void setTransliterationStyle​(TransliterationStyle transliterationStyle)
    Sets the transliteration-format of a number system.
    Parameters:
      `transliterationStyle` - the new transliteration style

  - ### getTextProperties

    public TextProperties getTextProperties()
    Specifies formatting properties for text.
    Returns:
      the text properties

  - ### getText

    public String getText()
    Gets the text.
    Returns:
      the text

  - ### setText

    public void setText​(String text)
    Sets the text.
    Parameters:
      `text` - the new text

  - ### getStyleMappings

    public List<StyleMapping> getStyleMappings()
    Contains a collection of StyleMapping objects.
    Returns:
      the style mappings

  - ### getDay

    public Day getDay()
    Gets the day of a month in a date.
    Returns:
      the day

  - ### setDay

    public void setDay​(Day day)
    Sets the day of a month in a date.
    Parameters:
      `day` - the new day

  - ### getMonth

    public Month getMonth()
    Gets the month in a date.
    Returns:
      the month

  - ### setMonth

    public void setMonth​(Month month)
    Sets the month in a date.
    Parameters:
      `month` - the new month

  - ### getYear

    public Year getYear()
    Gets the year in a date.
    Returns:
      the year

  - ### setYear

    public void setYear​(Year year)
    Sets the year in a date.
    Parameters:
      `year` - the new year

  - ### getEra

    public Era getEra()
    Gets the era in which a year is counted.
    Returns:
      the era

  - ### setEra

    public void setEra​(Era era)
    Sets the era in which a year is counted.
    Parameters:
      `era` - the new era

  - ### getDayOfWeek

    public DayOfWeek getDayOfWeek()
    Gets the day of a week in a date.
    Returns:
      the day of week

  - ### setDayOfWeek

    public void setDayOfWeek​(DayOfWeek dayOfWeek)
    Sets the day of a week in a date.
    Parameters:
      `dayOfWeek` - the new day of week

  - ### getWeekOfYear

    public WeekOfYear getWeekOfYear()
    Gets the week of a year in a date.
    Returns:
      the week of year

  - ### setWeekOfYear

    public void setWeekOfYear​(WeekOfYear weekOfYear)
    Sets the week of a year in a date.
    Parameters:
      `weekOfYear` - the new week of year

  - ### getQuarter

    public Quarter getQuarter()
    Gets the quarter of the year in a date.
    Returns:
      the quarter

  - ### setQuarter

    public void setQuarter​(Quarter quarter)
    Sets the quarter of the year in a date.
    Parameters:
      `quarter` - the new quarter

  - ### getHours

    public Hours getHours()
    Specifies whether hours are displayed as part of a date or time.
    Returns:
      the hours

  - ### setHours

    public void setHours​(Hours hours)
    Specifies whether hours are displayed as part of a date or time.
    Parameters:
      `hours` - the new hours

  - ### getMinutes

    public Minutes getMinutes()
    Specifies whether minutes are displayed as part of a date or time.
    Returns:
      the minutes

  - ### setMinutes

    public void setMinutes​(Minutes minutes)
    Specifies whether minutes are displayed as part of a date or time.
    Parameters:
      `minutes` - the new minutes

  - ### getSeconds

    public Seconds getSeconds()
    Specifies whether seconds are displayed as part of a date or time.
    Returns:
      the seconds

  - ### setSeconds

    public void setSeconds​(Seconds seconds)
    Specifies whether seconds are displayed as part of a date or time.
    Parameters:
      `seconds` - the new seconds

  - ### getAmPm

    public AmPm getAmPm()
    Specifies whether AM/PM is included as part of a date or time.
    Returns:
      the am pm

  - ### setAmPm

    public void setAmPm​(AmPm amPm)
    Specifies whether AM/PM is included as part of a date or time.
    Parameters:
      `amPm` - the new am pm

  - ### getDayText

    public String getDayText()
    Gets the day text.
    Returns:
      the day text

  - ### setDayText

    public void setDayText​(String dayText)
    Sets the day text.
    Parameters:
      `dayText` - the new day text

  - ### getMonthText

    public String getMonthText()
    Gets the month text.
    Returns:
      the month text

  - ### setMonthText

    public void setMonthText​(String monthText)
    Sets the month text.
    Parameters:
      `monthText` - the new month text

  - ### getYearText

    public String getYearText()
    Gets the yer text.
    Returns:
      the year text

  - ### setYearText

    public void setYearText​(String yearText)
    Sets the year text.
    Parameters:
      `yearText` - the new year text

  - ### getEraText

    public String getEraText()
    Gets the era text.
    Returns:
      the era text

  - ### setEraText

    public void setEraText​(String eraText)
    Sets the era text.
    Parameters:
      `eraText` - the new era text

  - ### getDayOfWeekText

    public String getDayOfWeekText()
    Gets the day of week text.
    Returns:
      the day of week text

  - ### setDayOfWeekText

    public void setDayOfWeekText​(String dayOfWeekText)
    Sets the day of week text.
    Parameters:
      `dayOfWeekText` - the new day of week text

  - ### getWeekOfYearText

    public String getWeekOfYearText()
    Gets the week of year text.
    Returns:
      the week of year text

  - ### setWeekOfYearText

    public void setWeekOfYearText​(String weekOfYearText)
    Sets the week of year text.
    Parameters:
      `weekOfYearText` - the new week of year text

  - ### getQuarterText

    public String getQuarterText()
    Gets the quarter text.
    Returns:
      the quarter text

  - ### setQuarterText

    public void setQuarterText​(String quarterText)
    Sets the quarter text.
    Parameters:
      `quarterText` - the new quarter text

  - ### getHoursText

    public String getHoursText()
    Gets the hours text.
    Returns:
      the hours text

  - ### setHoursText

    public void setHoursText​(String hoursText)
    Sets the hours text.
    Parameters:
      `hoursText` - the new hours text

  - ### getMinutesText

    public String getMinutesText()
    Gets the minutes text.
    Returns:
      the minutes text

  - ### setMinutesText

    public void setMinutesText​(String minutesText)
    Sets the minutes text.
    Parameters:
      `minutesText` - the new minutes text

  - ### getSecondsText

    public String getSecondsText()
    Gets the seconds text.
    Returns:
      the seconds text

  - ### setSecondsText

    public void setSecondsText​(String secondsText)
    Sets the seconds text.
    Parameters:
      `secondsText` - the new seconds text

  - ### getAmPmText

    public String getAmPmText()
    Gets the am/pm text.
    Returns:
      the am pm text

  - ### setAmPmText

    public void setAmPmText​(String amPmText)
    Sets the am/pm text.
    Parameters:
      `amPmText` - the new am pm text