public final class JsDateFormat extends Object implements JacksonContext.DateFormat
JsDateFormat class.
| Modifier and Type | Field and Description |
|---|---|
static org.gwtproject.i18n.shared.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 org.gwtproject.i18n.shared.DateTimeFormat |
DATE_FORMAT_STR_ISO8601_Z
Same as 'regular' 8601, but handles 'Z' as an alias for "+0000"
(or "GMT")
|
static org.gwtproject.i18n.shared.DateTimeFormat |
DATE_FORMAT_STR_PLAIN
ISO-8601 with just the Date part, no time
|
static org.gwtproject.i18n.shared.DateTimeFormat |
DATE_FORMAT_STR_RFC1123
This constant defines the date format specified by
RFC 1123 / RFC 822.
|
static org.gwtproject.i18n.client.TimeZone |
UTC_TIMEZONE
UTC TimeZone
|
| Constructor and Description |
|---|
JsDateFormat()
Constructor for JsDateFormat.
|
| Modifier and Type | Method and Description |
|---|---|
String |
format(Date date)
Format a date using
DATE_FORMAT_STR_ISO8601 and UTC_TIMEZONE |
String |
format(org.gwtproject.i18n.shared.DateTimeFormat format,
Date date)
Format a date using the
DateTimeFormat given in parameter and UTC_TIMEZONE. |
String |
format(org.gwtproject.i18n.shared.DateTimeFormat format,
org.gwtproject.i18n.client.TimeZone timeZone,
Date date)
Format a date using the
DateTimeFormat and TimeZone given in
parameters |
String |
format(JsonSerializerParameters params,
Date date)
Format a date using
JsonSerializerParameters or default values : DATE_FORMAT_STR_ISO8601 and UTC_TIMEZONE |
String |
format(org.gwtproject.i18n.client.TimeZone timeZone,
Date date)
Format a date using
DATE_FORMAT_STR_ISO8601 and TimeZone given in parameter |
<D extends Date> |
makeDateKeyParser() |
Date |
parse(boolean useBrowserTimezone,
String pattern,
Boolean hasTz,
String date)
Parse a date using the pattern given in parameter or
DATE_FORMAT_STR_ISO8601 and the browser timezone. |
Date |
parse(org.gwtproject.i18n.shared.DateTimeFormat format,
String date)
Parse a date using the
DateTimeFormat given in
parameter and the browser timezone. |
Date |
parse(String date)
Parse a date using
DATE_FORMAT_STR_ISO8601 and the browser timezone. |
public static final org.gwtproject.i18n.shared.DateTimeFormat DATE_FORMAT_STR_ISO8601
public static final org.gwtproject.i18n.shared.DateTimeFormat DATE_FORMAT_STR_ISO8601_Z
public static final org.gwtproject.i18n.shared.DateTimeFormat DATE_FORMAT_STR_PLAIN
public static final org.gwtproject.i18n.shared.DateTimeFormat DATE_FORMAT_STR_RFC1123
public static final org.gwtproject.i18n.client.TimeZone UTC_TIMEZONE
public String format(Date date)
DATE_FORMAT_STR_ISO8601 and UTC_TIMEZONEformat in interface JacksonContext.DateFormatpublic String format(JsonSerializerParameters params, Date date)
JsonSerializerParameters or default values : DATE_FORMAT_STR_ISO8601 and UTC_TIMEZONEformat in interface JacksonContext.DateFormatpublic String format(org.gwtproject.i18n.shared.DateTimeFormat format, Date date)
DateTimeFormat given in parameter and UTC_TIMEZONE.public String format(org.gwtproject.i18n.client.TimeZone timeZone, Date date)
DATE_FORMAT_STR_ISO8601 and TimeZone given in parameterpublic String format(org.gwtproject.i18n.shared.DateTimeFormat format, org.gwtproject.i18n.client.TimeZone timeZone, Date date)
DateTimeFormat and TimeZone given in
parametersformat - format to usetimeZone - timezone to usedate - date to formatpublic Date parse(String date)
DATE_FORMAT_STR_ISO8601 and the browser timezone.date - date to parsepublic Date parse(boolean useBrowserTimezone, String pattern, Boolean hasTz, String date)
DATE_FORMAT_STR_ISO8601 and the browser timezone.parse in interface JacksonContext.DateFormatpublic Date parse(org.gwtproject.i18n.shared.DateTimeFormat format, String date)
DateTimeFormat given in
parameter and the browser timezone.format - format to usedate - date to parsepublic <D extends Date> DateKeyParser<D> makeDateKeyParser()
makeDateKeyParser in interface JacksonContext.DateFormatCopyright © 2020. All rights reserved.