The temporal binding encompasses time-based data including, dates, times of day, durations, time periods, etc. The reference implementation has direct support for the following temporal types defined in the Java language:
The following table summarizes how these types are written and read on the e-NON stream:
temporal type | temporal fields written† | fields required to read‡ |
---|---|---|
Date | i | i, YMD(hms) |
GregorianCalendar | iz | i(z), YMD(hmsz) |
Instant | i(n) | i(n), YMD(hmsn) |
LocalDate | YMD | i, YMD |
LocalDateTime | YMD(hmsn) | i(n), YMD(hmsn) |
LocalTime | h(msn) | i(n), h(msn) |
MonthDay | MD | i, MD |
OffsetDateTime | i(n)o | i(no), YMD(hmsno) |
OffsetTime | h(msn)o | i(no), h(msno) |
Year | Y | i, Y |
YearMonth | YM | i, YM |
ZonedDateTime | i(n)z | i(nz), YMD(hmsnz) |
field | default |
---|---|
i, Y, M, D | can’t be defaulted |
h, m, s, n | 0* |
o, z | Local Zone ID provided in the eNON config |
The time of day fields can be defaulted but only when a higher magnitude field appears. This means that it’s not possible to specify a “midnight” time, 00:00:00.000 by specifying no fields. The minimum representation for midnight would be ‘h0
’. The hour is specified as 0, allowing the smaller fields to default.
When date-related fields are present, YMD
, then all of the time fields hmsn
will default to zero if not provided.