public final class DateFormat extends Object
| Modifier and Type | Field and Description |
|---|---|
static com.google.gwt.i18n.client.DateTimeFormat |
DATE_FORMAT_STR_ISO8601
Defines a commonly used date format that conforms
to ISO-8601 date formatting standard, when it includes basic undecorated
timezone definition
|
static com.google.gwt.i18n.client.DateTimeFormat |
DATE_FORMAT_STR_ISO8601_Z
Same as 'regular' 8601, but handles 'Z' as an alias for "+0000"
(or "GMT")
|
static com.google.gwt.i18n.client.DateTimeFormat |
DATE_FORMAT_STR_PLAIN
ISO-8601 with just the Date part, no time
|
static com.google.gwt.i18n.client.DateTimeFormat |
DATE_FORMAT_STR_RFC1123
This constant defines the date format specified by
RFC 1123 / RFC 822.
|
static com.google.gwt.i18n.client.TimeZone |
UTC_TIMEZONE
UTC TimeZone
|
| Modifier and Type | Method and Description |
|---|---|
static String |
format(Date date)
Format a date using
DATE_FORMAT_STR_ISO8601 and UTC_TIMEZONE |
static String |
format(com.google.gwt.i18n.client.DateTimeFormat format,
com.google.gwt.i18n.client.TimeZone timeZone,
Date date)
Format a date using the
DateTimeFormat and TimeZone given in
parameters |
static String |
format(String pattern,
Date date)
Format a date using the pattern given in parameter or
DATE_FORMAT_STR_ISO8601 if null and UTC_TIMEZONE. |
static Date |
parse(com.google.gwt.i18n.client.DateTimeFormat format,
String date)
Parse a date using the
DateTimeFormat given in
parameter and the browser timezone. |
static Date |
parse(String date)
Parse a date using
DATE_FORMAT_STR_ISO8601 and the browser timezone. |
static Date |
parse(String pattern,
String date)
Parse a date using the pattern given in parameter or
DATE_FORMAT_STR_ISO8601 and the browser timezone. |
public static final com.google.gwt.i18n.client.DateTimeFormat DATE_FORMAT_STR_ISO8601
public static final com.google.gwt.i18n.client.DateTimeFormat DATE_FORMAT_STR_ISO8601_Z
public static final com.google.gwt.i18n.client.DateTimeFormat DATE_FORMAT_STR_PLAIN
public static final com.google.gwt.i18n.client.DateTimeFormat DATE_FORMAT_STR_RFC1123
public static final com.google.gwt.i18n.client.TimeZone UTC_TIMEZONE
public static String format(Date date)
DATE_FORMAT_STR_ISO8601 and UTC_TIMEZONEdate - date to formatpublic static String format(String pattern, Date date)
DATE_FORMAT_STR_ISO8601 if null and UTC_TIMEZONE.pattern - pattern to use. If null, DATE_FORMAT_STR_ISO8601 will be used.date - date to formatpublic static String format(com.google.gwt.i18n.client.DateTimeFormat format, com.google.gwt.i18n.client.TimeZone timeZone, Date date)
DateTimeFormat and TimeZone given in
parametersformat - format to usetimeZone - timezone to usedate - date to formatpublic static Date parse(String date)
DATE_FORMAT_STR_ISO8601 and the browser timezone.date - date to parsepublic static Date parse(String pattern, String date)
DATE_FORMAT_STR_ISO8601 and the browser timezone.pattern - pattern to use. If null, DATE_FORMAT_STR_ISO8601 will be used.date - date to parseCopyright © 2014. All Rights Reserved.