DATETIME/INTERVAL related macros

Datetime and Interval need qualifiers (ex: YEAR TO MONTH) to complete the type definition.

The following macros can be used to manage those qualifiers and set the qt_qual or in_qual members of dtime_t and intrvl_t structures.

Table 1. Datetime/Interval related macros
Macro Description
TU_YEAR Defines the YEAR qualifier
TU_MONTH Defines the MONTH qualifier
TU_DAY Defines the DAY qualifier
TU_HOUR Defines the HOUR qualifier
TU_MINUTE Defines the MINUTE qualifier
TU_SECOND Defines the SECOND qualifier
TU_FRAC Defines default FRACTION(3) qualifier
TU_F1 Defines the FRACTION(1) qualifier
TU_F2 Defines the FRACTION(2) qualifier
TU_F3 Defines the FRACTION(3) qualifier
TU_F4 Defines the FRACTION(4) qualifier
TU_F5 Defines the FRACTION(5) qualifier
TU_END(q) Returns the end qualifier of a composed qualifier
TU_START(q) Returns the start qualifier of a composed qualifier
TU_LEN(q) Returns the length in digits of a datetime qualifier
TU_DTENCODE(q1,q2) Build a datetime qualifier as DATETIME q1 TO q2
TU_IENCODE(len,q1,q2) Build an interval qualifier as INTERVAL q1(len) TO q2
TU_CURRQUAL Default qualifier used by current