DateFormat class Flashcards
Formats the given date for the default locale and returns a string representation. Its overloaded version takes a StringBuffer and position as arguments and returns a StringBuffer object.
String format(Date date)
Reads the given String according to the default locale conventions to return a Date object; throws ParseException if it fails. Has an overloaded version that takes a ParsePosition( the position from which to parse the string) as an additional argument.
Date parse(String source)
Formats the given date for the default locale and returns a textual representation.
String format(Date date)
Returns the default DateFormat instance that supports both date and time; it uses the DateFormat.Short style for both date and time.
DateFormat.getInstance()
Returns the DateFormat instance suitable for processing dates for default locale; has two overloaded versions that take style and Locale as additional arguments.
DateFormat.getDateInstance()
Returns the DateFormat instance suitable for processing time for default locale; its two overloaded versions take style and Locale as additional arguments.
DateFormat.getTimeInstance()
Returns the DateFormat instance suitable for processing both date and time for a default locale; its two overloaded versions take style and Locale as additional arguments.
DateFormat.getDateTimeInstance()