Closed GoogleCodeExporter closed 9 years ago
ISO 8601:2004 offers the following _complete_ Basic and Extended formats for
date and time representation in section 4.3.2.
Basic format:
YYYYMMDDThhmmss Example: 19850412T101530
YYYYMMDDThhmmssZ 19850412T101530Z
YYYYMMDDThhmmss±hhmm 19850412T101530+0400
YYYYMMDDThhmmss±hh 19850412T101530+04
Extended format:
YYYY-MM-DDThh:mm:ss Example: 1985-04-12T10:15:30
YYYY-MM-DDThh:mm:ssZ 1985-04-12T10:15:30Z
YYYY-MM-DDThh:mm:ss±hh:mm 1985-04-12T10:15:30+04:00
YYYY-MM-DDThh:mm:ss±hh 1985-04-12T10:15:30+04
I propose that we require:
a) Complete formats though 8601 allows for incomplete ones (for example omitting seconds)
b) Date and time formats (date only, time only and other formats exist too)
c) UTC formats. Since this
d) 'Extended' format as it is slightly more human readable though this is not of primary importance to an interchange format.
In other words this one:
YYYY-MM-DDThh:mm:ssZ 1985-04-12T10:15:30Z
My reasoning is that these are modest constraints for our purposes and
significantly simplifying for implementers.
Applying the same logic would lead to use of the following format for duration
from section 4.4.4.2.2.
Extended format: PYYYY-MM-DDThh:mm:ss Example: P0002-10-15T10:30:20
and from section this for time interval
Extended format:
YYYY-MM-DDThh:mm:ss/PYYYY-MM-DDThh:mm:ss
Example:
1985-04-12T23:20:50/P0001-02-15T12:30:00
At the risk of undermining my own proposal for simplicity I find the partial
specification of durations quite attractive so perhaps we should also consider
that:
4.4.4.2.1 Format with designators
Basic and extended format: PnnYnnMnnDTnnHnnMnnS
PnnW
Example 1: P2Y10M15DT10H30M20S
Example 2: P6W
Original comment by tstephen...@gmail.com
on 19 Apr 2012 at 2:08
The missing section on time intervals in my comment above is:
4.4.4.3 Representations of time interval identified by start and duration
Original comment by tstephen...@gmail.com
on 19 Apr 2012 at 2:10
It was resolved that we would use the potion of ISO 8601 that corresponds to
the XSD type dateTime and Duration. Namely YYYY-MM-DDThh:mm:ssZ for dateTime
and PnnYnnMnnDTnnHnnMnnS or PnnW for duration.
Furthermore, it was resolved that the text of spec should specify that in the
case of dateTime entries should always be resolved to Zulu time for transport.
Original comment by dga...@trisotech.com
on 10 May 2012 at 7:46
For clarification: intervals will be captured using durations
Original comment by dga...@trisotech.com
on 17 May 2012 at 4:52
Original comment by sringue...@trisotech.com
on 24 Oct 2012 at 7:08
Original issue reported on code.google.com by
dga...@trisotech.com
on 12 Apr 2012 at 5:59