Enum Class CalendarFormat

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

public enum CalendarFormat extends Enum<CalendarFormat>
Supported wire formats for Calendar values.

Used by MarshallingContext.Builder.calendarFormat(CalendarFormat), Marshalled.calendarFormat(), MarshalledProp.calendarFormat(), and MarshalledConfig.calendarFormat() to control how Calendar values (including GregorianCalendar) are written to and read from the wire.

The default is ISO_OFFSET_DATE_TIME which preserves the historical wire output produced before this enum existed.

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.

XMLGregorianCalendar fields always emit toXMLFormat() regardless of the configured CalendarFormat. The XML_FORMAT constant exists so that regular Calendar / GregorianCalendar fields can opt into the same wire form for symmetry with their XMLGregorianCalendar siblings.