An omitted component
can be represented by a hyphen ( - ) or an
x in the extended datetime form
yyyy-mm-ddT
hh:mm:ss and
in the extended duration form P
yyyy-mm-ddT
hh:mm:ss.
Omitted components in
the durations form P
nY
nM
nDT
nH
nM
nS
are dropped, they do not contain a hyphen or x. For example, P2mT4H.
The following formats
write omitted components that use the hyphen and the x:
|
|
|
|
|
|
|
P2Y2DT4H5M6S/--09-15T15:-:00
|
|
|
|
P000---02T02:55:20/2012---15T-:-:45
|
|
|
|
P2Y2DT4H5M6S/x-09-15T15:x:00
|
|
|
|
P0003-x-02T02:55:20/2012-x-15Tx:x:45
|
Datetime values with
omitted components that are formatted with either the $N8601B format
or the $N8601BA format are formatted in the extended notation using
the hyphen for omitted components to ensure accurate data. For example,
when the month is an omitted component, the value 2012---15 is written
and not 2012-15.
The extended notation
with hyphens is also used in place of the basic notation if a duration
is formatted by using the $N8601BA format. Using the same date, P2012---15
is written and not P2012-15.