javafx.util.converter

## Class DateStringConverter

- java.lang.Object
- - javafx.util.StringConverter<Date>
  - - javafx.util.converter.DateTimeStringConverter
    - - javafx.util.converter.DateStringConverter

-     public class DateStringConverter
      extends DateTimeStringConverter

  `StringConverter` implementation for `Date` values.

  Since:
    JavaFX 2.1
  See Also:
    `TimeStringConverter`, `DateTimeStringConverter`

- - ### Field Summary

    - ### Fields inherited from class javafx.util.converter.DateTimeStringConverter

      `dateFormat, dateStyle, locale, pattern, timeStyle`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DateStringConverter()` Create a `StringConverter` for `Date` values, using the `DateFormat.DEFAULT` date style.
    `DateStringConverter(DateFormat dateFormat)` Create a `StringConverter` for `Date` values, using the specified `DateFormat` formatter.
    `DateStringConverter(int dateStyle)` Create a `StringConverter` for `Date` values, using the specified `DateFormat` date style.
    `DateStringConverter(Locale locale)` Create a `StringConverter` for `Date` values, using the specified locale and the `DateFormat.DEFAULT` date style.
    `DateStringConverter(Locale locale, int dateStyle)` Create a `StringConverter` for `Date` values, using the specified locale and `DateFormat` date style.
    `DateStringConverter(Locale locale, String pattern)` Create a `StringConverter` for `Date` values, using the specified locale and pattern.
    `DateStringConverter(String pattern)` Create a `StringConverter` for `Date` values, using the specified pattern.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected DateFormat` | `getDateFormat()` Return a `DateFormat` instance to use for formatting and parsing in this `StringConverter`.

    - ### Methods inherited from class javafx.util.converter.DateTimeStringConverter

      `fromString, toString`

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

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

- - ### Constructor Detail

    - #### DateStringConverter

          public DateStringConverter()

      Create a `StringConverter` for `Date` values, using the `DateFormat.DEFAULT` date style.

    - #### DateStringConverter

          public DateStringConverter(int dateStyle)

      Create a `StringConverter` for `Date` values, using the specified `DateFormat` date style.
      Parameters:
        `dateStyle` - the given formatting style. For example, `DateFormat.SHORT` for "M/d/yy" in the US locale.
      Since:
        JavaFX 8u40

    - #### DateStringConverter

          public DateStringConverter(Locale locale)

      Create a `StringConverter` for `Date` values, using the specified locale and the `DateFormat.DEFAULT` date style.
      Parameters:
        `locale` - the given locale.

    - #### DateStringConverter

          public DateStringConverter(Locale locale,
                                     int dateStyle)

      Create a `StringConverter` for `Date` values, using the specified locale and `DateFormat` date style.
      Parameters:
        `locale` - the given locale.
        `dateStyle` - the given formatting style. For example, `DateFormat.SHORT` for "M/d/yy" in the US locale.
      Since:
        JavaFX 8u40

    - #### DateStringConverter

          public DateStringConverter(String pattern)

      Create a `StringConverter` for `Date` values, using the specified pattern.
      Parameters:
        `pattern` - the pattern describing the date format.

    - #### DateStringConverter

          public DateStringConverter(Locale locale,
                                     String pattern)

      Create a `StringConverter` for `Date` values, using the specified locale and pattern.
      Parameters:
        `locale` - the given locale.
        `pattern` - the pattern describing the date format.

    - #### DateStringConverter

          public DateStringConverter(DateFormat dateFormat)

      Create a `StringConverter` for `Date` values, using the specified `DateFormat` formatter.
      Parameters:
        `dateFormat` - the `DateFormat` to be used for formatting and parsing.

  - ### Method Detail

    - #### getDateFormat

          protected DateFormat getDateFormat()

      Return a `DateFormat` instance to use for formatting and parsing in this `StringConverter`.

      Overrides:
        `getDateFormat` in class `DateTimeStringConverter`

Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.