Package com.smartgwt.client.types

# Enum DateDisplayFormat

java.lang.Object
java.lang.Enum<DateDisplayFormat>
com.smartgwt.client.types.DateDisplayFormat

All Implemented Interfaces:
  `ValueEnum`, `Serializable`, `Comparable<DateDisplayFormat>`, `Constable`

public enum DateDisplayFormat extends Enum<DateDisplayFormat> implements ValueEnum
Valid display formats for dates. These strings are the names of formatters which can be passed to `DateUtil.setNormalDisplayFormat()` or `DateUtil.setShortDisplayFormat()` and will be subsequently used as default long or short formatters for date objects by Smart GWT components.

Custom formatting can also be applied by passing a `FormatString` instead of a `DateDisplayFormat` string to `DateUtil.setNormalDisplayFormat()` et al. See the `FormatString` docs for details.

Default set of valid display formats is as follows:

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `TODATESTAMP`
  Date in the format <YYYYMMDD>T<HHMMSS>Z Example: `20051104T111001Z`
  `TOEUROPEANSHORTDATE`
  Short date in format DD/MM/YYYY.
  Example: `4/11/2005`
  `TOEUROPEANSHORTDATETIME`
  Short date with time in format DD/MM/YYYY HH:MM
  Example: `4/11/2005 11:03`
  `TOJAPANSHORTDATE`
  Short date in format YYYY/MM/DD.
  Example: `2005/11/4`
  `TOJAPANSHORTDATETIME`
  Short date with time in format YYYY/MM/DD HH:MM
  Example: `2005/11/4 11:03`
  `TOLOCALESTRING`
  Default native browser 'toLocaleString()' implementation.
  `TOSERIALIZEABLEDATE`
  Date in the format YYYY-MM-DD HH:MM:SS
  Example: `2005-11-04 11:09:15`
  `TOSTRING`
  Default native browser 'toString()' implementation.
  `TOUSSHORTDATE`
  Short date in format MM/DD/YYYY.
  Example: `11/4/2005`
  `TOUSSHORTDATETIME`
  Short date with time in format MM/DD/YYYY HH:MM
  Example: `11/4/2005 11:03`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getValue()`
  `static DateDisplayFormat`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static DateDisplayFormat[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

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

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### TOSTRING

    public static final DateDisplayFormat TOSTRING
    Default native browser 'toString()' implementation. May vary by browser.
    Example: `Fri Nov 04 2005 11:03:00 GMT-0800 (Pacific Standard Time)`

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "toString".

  - ### TOLOCALESTRING

    public static final DateDisplayFormat TOLOCALESTRING
    Default native browser 'toLocaleString()' implementation. May vary by browser. Example: `Friday, November 04, 2005 11:03:00 AM`

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "toLocaleString".

  - ### TOUSSHORTDATE

    public static final DateDisplayFormat TOUSSHORTDATE
    Short date in format MM/DD/YYYY.
    Example: `11/4/2005`

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "toUSShortDate".

  - ### TOUSSHORTDATETIME

    public static final DateDisplayFormat TOUSSHORTDATETIME
    Short date with time in format MM/DD/YYYY HH:MM
    Example: `11/4/2005 11:03`

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "toUSShortDatetime".

  - ### TOEUROPEANSHORTDATE

    public static final DateDisplayFormat TOEUROPEANSHORTDATE
    Short date in format DD/MM/YYYY.
    Example: `4/11/2005`

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "toEuropeanShortDate".

  - ### TOEUROPEANSHORTDATETIME

    public static final DateDisplayFormat TOEUROPEANSHORTDATETIME
    Short date with time in format DD/MM/YYYY HH:MM
    Example: `4/11/2005 11:03`

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "toEuropeanShortDatetime".

  - ### TOJAPANSHORTDATE

    public static final DateDisplayFormat TOJAPANSHORTDATE
    Short date in format YYYY/MM/DD.
    Example: `2005/11/4`

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "toJapanShortDate".

  - ### TOJAPANSHORTDATETIME

    public static final DateDisplayFormat TOJAPANSHORTDATETIME
    Short date with time in format YYYY/MM/DD HH:MM
    Example: `2005/11/4 11:03`

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "toJapanShortDatetime".

  - ### TOSERIALIZEABLEDATE

    public static final DateDisplayFormat TOSERIALIZEABLEDATE
    Date in the format YYYY-MM-DD HH:MM:SS
    Example: `2005-11-04 11:09:15`

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "toSerializeableDate".

  - ### TODATESTAMP

    public static final DateDisplayFormat TODATESTAMP
    Date in the format <YYYYMMDD>T<HHMMSS>Z Example: `20051104T111001Z`

    Note: In addition to these standard formats, custom formatting can be set by passing a function directly to `DateUtil.setNormalDisplayFormat()` et al. This function will then be executed whenever the appropriate formatter method is called [eg `Date.toNormalDate()`], in the scope of the date instance in question.

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "toDateStamp".

- ## Method Details

  - ### values

    public static DateDisplayFormat[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static DateDisplayFormat valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### getValue

    public String getValue()
    Specified by:
      `getValue` in interface `ValueEnum`