On Thu, Jul 30, 2009 at 07:47:36PM -0400, Mark J. Reed wrote:
> On Thu, Jul 30, 2009 at 7:40 PM, Patrick R. Michaud<pmich...@pobox.com> wrote:
> \> Unfortunately, the .rpm format doesn't allow hyphens in package
> > version numbers, so we probably need to switch to something different.
> > The "obvious" choices would be things like "2009.07" or "200907",
> > but neither of those represent valid ISO8601 formatted dates (the
> > hyphened version is a valid date).
> 
> Not true.  Most delimiters are optional according to ISO-8601,
> including the hyphens between date components, the "T" between date
> and time, and the colons between time components.  

The hyphen is not optional when only the day-of-month has been omitted.
See ISO 8601:2004 section 4.1.2.3 ("Representations with reduced
date accuracy") [1]:

    If in a given application it is sufficient to express a 
    calendar date with less accuracy than a complete representation 
    as specified in 4.1.2.2, either two, four or six digits may be 
    omitted, the omission starting from the extreme right-hand side. 
    The resulting representation will then indicate a month, a 
    year or a century, as set out below. When only [DD] is omitted, 
    a separator shall be inserted between [YYYY] and [MM], but
    separators shall not be used in the other representations with 
    reduced accuracy.

Thus "2009-05-11", "20090511", and "2009-05" are all valid ISO 8601
dates, but "200905" is not valid ISO 8601 because the separator is 
required when only the day-of-month is omitted from the date.

Thanks,

Pm

[1] 
http://isotc.iso.org/livelink/livelink/4021199/ISO_8601_2004_E.zip?func=doc.Fetch&nodeid=4021199,
 link taken from wikipedia.org [2]
[2] http://en.wikipedia.org/wiki/ISO_8601

Reply via email to