ISO 8601 provides a standard unambiguous format (several, actually) for dates and times. Unfortunately, NSDateFormatter alone does not completely support ISO 8601; in particular, it does not support week dates or ordinal dates.
This came to my attention when I began writing a patch for Vienna to add support for the ttl
element of RSS 2.0 and the updatePeriod
, updateFrequency
, and updateBase
elements of RDF Site Summary 1.0's Syndication module (which it borrowed from Open Content Syndication). The latter prescribes a YYYY-MM-DDTHH:MM format for dates. Somehow, I got it into my head that it prescribed ISO 8601 format for dates (as opposed to only the YYYY-MM-DDTHH:MM format), which would have meant that NSDateFormatter wouldn't work.
So, that's why I wrote this parser. On the whole, I think it works out.
Version 0.3 fixed some bugs found by Colin Barrett.
In version 0.2, I added an unparser. Now you can go back and forth between NSCalendarDate and NSString.
MD5 and SHA1 signatures were created using the md5sum(1) and sha1sum(1) utilities from GNU coreutils.