public class DateFormats extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DateFormats.DayOfWeekDateFormat
There is no DateFormat which can return the day of the week as a number available in
java.text package.
|
| Constructor and Description |
|---|
DateFormats() |
| Modifier and Type | Method and Description |
|---|---|
static DateFormat |
getInstance(String format,
String timeZone,
Locale locale)
Creates a DateFormat instance, based on a String.
|
public static DateFormat getInstance(String format, String timeZone, Locale locale)
format - The format defining the DateFormat. This can be constants like :FULL, :FULL.FULL, :LONG, :MEDIUM or :SHORT.
It can also be 'e' for weekday. Also 'RFC822' or 'rfc822' is possible then the
quite complicated http://www.faqs.org/rfcs/rfc822.html compliant date and time
is made, which comes in handy when you need to create a rss feed f.e.
Or none of those, then a SimpleDateFormat is instantiated.timeZone - A String describing the timeZone (see DateFormat#setTimeZone)locale - Most DateFormat's need a Locale too.IllegalArgumentExceptionMMBase 1.9-SNAPSHOT - ${javadoctimestamp}