Dating description definitions
Leading and Trailing whitespace is allowed, but SHOULD be removed when using the XML format.Note: This means that a string that consists only of whitespace could be trimmed to nothing, which would be treated as an invalid element value. Times can be converted to a Duration since midnight.This document is a NOTE made available by the W3 Consortium for discussion only.This indicates no endorsement of its content, nor that the Consortium has, is, or will be allocating any resources to the issues addressed by the NOTE.
A particular problem with ISO 8601 is that it allows the century to be omitted from years, which is likely to cause trouble as we approach the year 2000.This profile defines two ways of handling time zone offsets: Times are expressed in local time, together with a time zone offset in hours and minutes.A time zone offset of " hh:mm" indicates that the date/time uses a local time zone which is "hh" hours and "mm" minutes ahead of UTC.Year: YYYY (eg 1997) Year and month: YYYY-MM (eg 1997-07) Complete date: YYYY-MM-DD (eg 1997-07-16) Complete date plus hours and minutes: YYYY-MM-DDThh:mm TZD (eg 1997-07-16T ) Complete date plus hours, minutes and seconds: YYYY-MM-DDThh:mm:ss TZD (eg 1997-07-16T ) Complete date plus hours, minutes, seconds and a decimal fraction of a second YYYY-MM-DDThh:mm:ss.s TZD (eg 1997-07-16T.45 ) YYYY = four-digit year MM = two-digit month (01=January, etc.) DD = two-digit day of month (01 through 31) hh = two digits of hour (00 through 23) (am/pm NOT allowed) mm = two digits of minute (00 through 59) ss = two digits of second (00 through 59) s = one or more digits representing a decimal fraction of a second TZD = time zone designator (Z or hh:mm or -hh:mm) This profile does not specify how many digits may be used to represent the decimal fraction of a second.
An adopting standard that permits fractions of a second must specify both the minimum number of digits (a number greater than or equal to one) and the maximum number of digits (the maximum may be stated to be "unlimited").2018, 1973-06, 1905-08-23, 2015-02-07T- or 2017-01-01T.000Z. If hours and minutes are specified, a time zone SHALL be populated. Leap Seconds are allowed - see below([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9] )? When the value is missing, and there are no extensions, the element is not represented at all.