For dates, you can try using NSDataDetector, but I’ve found recently that it 
doesn’t work well if you only have a date or a time, only if you have both; it 
adds a placeholder value in those cases and doesn’t report that you only have 
one or the other.  In the case for RSS feeds, though, you shouldn’t have that 
issue unless you’re using it on content, but keep that in mind.

And, if anyone else finds the same need from NSDataDetector as me, please join 
me in writing a bug requesting this to be fixed in the next OSes and documented 
how we can make some use of NSDataDetector in the current and prior versions (I 
have personally figured this out already, but it’s fragile and not the best or 
supported practice).  Note that my bug has already been duplicated, probably 
from my initial tech support incident, and this helps get it prioritized higher.
—
Gary

> On Feb 13, 2016, at 10:44 AM, Jens Alfke <j...@mooseyard.com> wrote:
> 
> There are other “fun” details, like parsing dates — the different specs call 
> for different date formats, and many feeds just ignore those and emit some 
> other date format, which makes parsing them really difficult. Our code ended 
> up with a list of about 20(!) date-format strings and tried them one after 
> the other.

_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to