Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public class SimpleDateFormat

  1. Object
  2. Format
  3. DateFormat
  4. SimpleDateFormat

ImplementsCloneable

Deprecated. this class has many issues in iOS and other platforms, please use the L10NManager
A class for parsing and formatting dates with a given pattern, compatible with the Java 6 API.

Constructors

public SimpleDateFormat()Construct a SimpleDateFormat with no pattern.
public SimpleDateFormat(String pattern)Construct a SimpleDateFormat with a given pattern.

Methods

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

Inherited fields

Inherited methods

Constructor details

SimpleDateFormat

public SimpleDateFormat()
Construct a SimpleDateFormat with no pattern.

SimpleDateFormat

public SimpleDateFormat(String pattern)
Construct a SimpleDateFormat with a given 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 DateFormatSymbols
new format symbols.

applyPattern

public void applyPattern(String pattern)
Apply a new pattern.

Parameters

pattern String
the pattern to set

clone

public Object clone()

format

public String format(Date source)
Format a given date.

Parameters

source Date
date to be formatted.

Returns

formatted date.

parse

public Date parse(String source) throws ParseException
NOT IMPLEMENTED - use SimpleDateFormat for parsing instead.