Combined dates and times

drama diary/journal letter time phrase-level encoding
time value date dateRange

Encoding of combined date and time data, using the value attribute for date

Some kinds of entry-based documents, such as diaries or letters, give a combination of date and time, and it may be useful to encode these as a single regularized value rather than as two separate pieces of data. You can do this by encoding a combined date/time value on the value attribute of date or time.

The combined date and time are encoded in the ISO 8601 standard format, with the date value first, separated by a T, as follows:

<date value="1782-01-14T22:15">January 14, 1782 at 10:15 in the evening</date>

Date/time ranges may be encoded in the same way as date ranges, using either the date or the dateRange element:

<date value="1782-01-14T22:15/1782-01-15T07">from 
January 14, 1782 at 10:15 in the evening till about 7:00 
the following morning</date>

<dateRange from="1782-01-14T22:15" to="1782-01-15T07" exact="from">
from January 14, 1782 at 10:15 in the evening till 
about 7:00 the following morning</date>

Note that the word about is being interpreted as meaning that the time is not exact, so the minutes portion of the second time value are omitted (07 rather than 07:00), and the exact attribute on dateRange indicates that only the starting time is exact.

By default, you should use date for this kind of combined encoding, since it is a more commonly used element. But if your project uses time throughout, and has only occasional cases where a date is included, then consistency may dictate using time for combined date/time encoding as well.