Java java.text SimpleDateFormat fields, constructors, methods, implement or subclass

Example usage for Java java.text SimpleDateFormat fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.text SimpleDateFormat.

The text is from its open source code.

Subclass

java.text.SimpleDateFormat has subclasses.
Click this link to see all its subclasses.

Constructor

SimpleDateFormat(String pattern)
Constructs a SimpleDateFormat using the given pattern and the default date format symbols for the default java.util.Locale.Category#FORMAT FORMAT locale.
SimpleDateFormat()
Constructs a SimpleDateFormat using the default pattern and date format symbols for the default java.util.Locale.Category#FORMAT FORMAT locale.
SimpleDateFormat(String pattern, Locale locale)
Constructs a SimpleDateFormat using the given pattern and the default date format symbols for the given locale.
SimpleDateFormat(String pattern, DateFormatSymbols formatSymbols)
Constructs a SimpleDateFormat using the given pattern and date format symbols.

Method

voidapplyLocalizedPattern(String pattern)
Applies the given localized pattern string to this date format.
voidapplyPattern(String pattern)
Applies the given pattern string to this date format.
Objectclone()
Creates a copy of this SimpleDateFormat.
booleanequals(Object obj)
Compares the given object with this SimpleDateFormat for equality.
Stringformat(Date date)
Formats a Date into a date-time string.
StringBufferformat(Date date, StringBuffer toAppendTo, FieldPosition pos)
Formats the given Date into a date/time string and appends the result to the given StringBuffer.
StringBufferformat(Date date, StringBuffer toAppendTo, FieldDelegate delegate)
Dateget2DigitYearStart()
Returns the beginning date of the 100-year period 2-digit years are interpreted as being within.
Locale[]getAvailableLocales()
Returns an array of all locales for which the get*Instance methods of this class can return localized instances.
CalendargetCalendar()
Gets the calendar associated with this date/time formatter.
DateFormatSymbolsgetDateFormatSymbols()
Gets a copy of the date and time format symbols of this date format.
DateFormatgetDateInstance(int style, Locale aLocale)
Gets the date formatter with the given formatting style for the given locale.
DateFormatgetDateTimeInstance(int dateStyle, int timeStyle, Locale aLocale)
Gets the date/time formatter with the given formatting styles for the given locale.
TimeZonegetTimeZone()
Gets the time zone.
inthashCode()
Returns the hash code value for this SimpleDateFormat object.
Dateparse(String source)
Parses text from the beginning of the given string to produce a date.
Dateparse(String text, ParsePosition pos)
Parses text from a string to produce a Date.
ObjectparseObject(String source)
Parses text from the beginning of the given string to produce an object.
voidset2DigitYearStart(Date startDate)
Sets the 100-year period 2-digit years will be interpreted as being in to begin on the date the user specifies.
voidsetCalendar(Calendar newCalendar)
Set the calendar to be used by this date format.
voidsetDateFormatSymbols(DateFormatSymbols newFormatSymbols)
Sets the date and time format symbols of this date format.
voidsetLenient(boolean lenient)
Specify whether or not date/time parsing is to be lenient.
voidsetTimeZone(TimeZone zone)
Sets the time zone for the calendar of this DateFormat object.
StringtoLocalizedPattern()
Returns a localized pattern string describing this date format.
StringtoPattern()
Returns a pattern string describing this date format.
StringtoString()
Returns a string representation of the object.