public enum JSONDateFormat extends java.lang.Enum<JSONDateFormat> implements ValueEnum
JSONEncoder.encodeDate()
for a custom format.Enum Constant and Description |
---|
DATE_CONSTRUCTOR
dates are encoded as raw JavaScript code for creating a Date object, that is:
|
LOGICAL_DATE_CONSTRUCTOR
serializes Date instances in a way that preserves the distinction between logical dates, logical times, and full
datetime values, as explained
here . |
XML_SCHEMA
dates are is encoded as a String in XML Schema date
format in UTC, for example, "2005-08-02" for logical date fields or "2005-08-01T21:35:48.350" for
datetime fields. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getValue() |
static JSONDateFormat |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static JSONDateFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JSONDateFormat XML_SCHEMA
datetime
fields. See Date format and\n storage
for
more information.
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "xmlSchema".
public static final JSONDateFormat DATE_CONSTRUCTOR
new Date(1238792738633)This is not strictly valid JSON, but if eval()d, will result in an identical date object, regardless of timezone. However, it does not preserve the distinction between logical dates vs full datetime values - use "logicalDateConstructor" mode for that.
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "dateConstructor".
public static final JSONDateFormat LOGICAL_DATE_CONSTRUCTOR
here
. Like 'dateConstructor' mode,
this does not produce strictly valid JSON, and instead embeds JavaScript calls. In addition, unlike 'dateConstructor' mode, using eval() to reconstruct the original JavaScript objects will only work in the presence of Smart GWT, and not just in a generic JavaScript interpreter.
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "logicalDateConstructor".
public static JSONDateFormat[] values()
for (JSONDateFormat c : JSONDateFormat.values()) System.out.println(c);
public static JSONDateFormat valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null