On 17 Mar '08, at 4:30 PM, Nathan Vander Wilt wrote:
This works, BUT...I had to edit the format a bit because my time strings (in this sample!) did not have the decimal seconds. However, I wouldn't be surprised to see input with sub-second precision. How can I specify optional format parts?
I don't think you can. You can work around it by trying both formats in sequence. (No joke — you should see the date parsing code in PubSub. It tries about 30 different date formats one after the other, to handle all the crazy mistakes people make in generating RSS feeds.)
As it is, I might as well get rid of the hasSuffix checking and put a quoted 'Z' in the format, since that is actually far less likely to change than the seconds part in this case
You can do that, but then of course you'll fail to parse dates that do have a timezone...
—Jens
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]