Enum Class DateFormat

java.lang.Object
java.lang.Enum<DateFormat>
org.apache.juneau.marshall.DateFormat
All Implemented Interfaces:
Serializable, Comparable<DateFormat>, Constable

public enum DateFormat extends Enum<DateFormat>
Supported wire formats for Date values.

Used by MarshallingContext.Builder.dateFormat(DateFormat), Marshalled.dateFormat(), MarshalledProp.dateFormat(), and MarshalledConfig.dateFormat() to control how Date values are written to and read from the wire.

The default is ISO_LOCAL_DATE_TIME which preserves the historical wire output produced before this enum existed (note: Date carries no zone so the default emits a local date-time, deliberately differing from CalendarFormat.ISO_OFFSET_DATE_TIME).

Numeric formats (MILLIS) emit native numeric wire types on binary serializers (BSON / CBOR / MsgPack) and bare numbers on text formats. Text formats emit a quoted ISO 8601 string for every other constant.