"The general timing specification (GTS) semantically is a general set of
points in time. The purpose of the GTS is to specify the complex timing of
events and actions (mainly in orders and scheduling systems.) The GTS also
supports the cyclical validity patterns that may exist for certain kinds of
information, such as phone numbers (evening, daytime)...
The GTS data type has the following aspects:
· GTS as a general set of points in time (SET<TS>). From this aspect GTS
answers whether any given point in time falls in the schedule described by
the GTS value.
· GTS as the combination of multiple periodic intervals of time. This aspect
describes how both simple and complex repeat-patterns are specified with the
GTS.
· GTS as a generator of a sequence of intervals of point in time
(LIST<IVL<TS>>). From this aspect, GTS can generate all occurrence intervals
of an event or action, or all validity periods for a fact.
· GTS as an expression-syntax defined for a calendar. This aspect is the GTS
literal form.
In all cases the GTS is defined as a set of point in time (SET<TS>). Using
the set operations, union,
intersection and difference, more complex sets of time can be constructed
from simpler ones. Ultimately the building blocks from which all GTS values
are constructed are interval, periodic interval, and event-related periodic
interval. The construction of the GTS can be specified in the literal
form...
I've recently passed part of the HL7 data type spec to Bran Selic,
I arguing for using this opportunity to develop a more broadly useful and
powerful time
[BTW, I'd personally enumerate the days of the week with Sunday first, not
last]