# Class SimpleDateFormat

java.lang.Object
java.text.Format
java.text.DateFormat
java.text.SimpleDateFormat

All Implemented Interfaces:
  `Cloneable`

public class SimpleDateFormat extends DateFormat
A class for parsing and formatting dates with a given pattern, compatible with the Java 6 API.

- ## Field Summary

  ### Fields inherited from class DateFormat

  `DEFAULT, FULL, LONG, MEDIUM, SHORT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleDateFormat()`
  Construct a SimpleDateFormat with no pattern.
  `SimpleDateFormat(String pattern)`
  Construct a SimpleDateFormat with a given pattern.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `applyPattern(String pattern)`
  Apply a new pattern.
  `Object`
  `clone()`
  `String`
  `format(Date source)`
  Format a given date.
  `DateFormatSymbols`
  `getDateFormatSymbols()`
  Get the date format symbols for parsing/formatting textual components of dates in a localization sensitive way.
  `Date`
  `parse(String source)`
  NOT IMPLEMENTED - use SimpleDateFormat for parsing instead.
  `void`
  `setDateFormatSymbols(DateFormatSymbols newSymbols)`
  Apply new date format symbols for parsing/formatting textual components of dates in a localisation sensitive way.
  `String`
  `toPattern()`

  ###### Returns

  ### Methods inherited from class DateFormat

  `equals, format, getDateInstance, getDateInstance, getDateTimeInstance, getInstance, getTimeInstance, getTimeInstance, hashCode, parseObject`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### SimpleDateFormat

    public SimpleDateFormat()
    Construct a SimpleDateFormat with no pattern.

  - ### SimpleDateFormat

    public SimpleDateFormat(String pattern)

    Construct a SimpleDateFormat with a given pattern.

    ###### Parameters

    - `pattern`

- ## Method Details

  - ### toPattern

    public String toPattern()

    ###### Returns

    the pattern

  - ### getDateFormatSymbols

    public DateFormatSymbols getDateFormatSymbols()

    Get the date format symbols for parsing/formatting textual components of dates in a localization sensitive way.

    ###### Returns

    current symbols.

  - ### setDateFormatSymbols

    public void setDateFormatSymbols(DateFormatSymbols newSymbols)

    Apply new date format symbols for parsing/formatting textual components of dates in a localisation sensitive way.

    ###### Parameters

    - `newSymbols`: new format symbols.

  - ### applyPattern

    public void applyPattern(String pattern)

    Apply a new pattern.

    ###### Parameters

    - `pattern`: the pattern to set

  - ### clone

    public Object clone()
    Overrides:
      `clone` in class `DateFormat`

  - ### format

    public String format(Date source)
    Description copied from class: `DateFormat`

    Format a given date.

    ###### Parameters

    - `source`: date to be formatted.

    ###### Returns

    formatted date.

    Overrides:
      `format` in class `DateFormat`

  - ### parse

    public Date parse(String source) throws ParseException
    Description copied from class: `DateFormat`
    NOT IMPLEMENTED - use SimpleDateFormat for parsing instead.
    Overrides:
      `parse` in class `DateFormat`
    Throws:
      `ParseException`