title: What's the right way to parse an ISO8601 date in cocoa?
body: <p>I would like to parse ISO8601 dates in Cocoa, both for iOS 4+ and OSX 10.6+</p>
  <p>There are a few questions about this on StackOverflow already, but in my opinion <strong>none</strong> of them contain good answers. Here's what I think constitutes a good answer:</p>
  <ol>
  <li><p>The answer should point to code with support for ISO8601. This code should compile cleanly under XCode 4 for both iOS 4+ and OSX 10.6+.</p>
  </li>
  <li><p>The code should support <strong>all</strong> possible ISO8601 date formats.</p>
  <p>Please note that there are many, many possibilities here. Simply answering with one or two format strings for <code>NSDateFormatter</code> is not going to cut it.</p>
  </li>
  <li><p>The answer should <strong>not</strong> be <a href="http://boredzo.org/iso8601parser/" rel="noreferrer">this library</a>. That's because it is riddled with dangerous 32-bit assumptions, it's far more complicated than necessary, and it doesn't compile clean with XCode4/Clang. Bottom line: I don't trust it at all!</p>
  </li>
  </ol>
  <p>Thanks, fellow Cocoa-ites. I'm excited to find out if there's a real answer here!</p>