Re: Obtain an NSDate object from any casually entered user string
Re: Obtain an NSDate object from any casually entered user string
- Subject: Re: Obtain an NSDate object from any casually entered user string
- From: Ken Thomases <email@hidden>
- Date: Wed, 14 May 2014 10:09:43 -0500
On May 14, 2014, at 8:41 AM, Jonathan Mitchell wrote:
> Is there a way to obtain an NSDate object from a casually entered user string, say: 1 1 2015 or 25 jul 15?
>
> I have looked at the various NSDateFormatter and NSDate API and cannot spot what I am after.
You might try NSDataDetector with type NSTextCheckingTypeDate.
Cheers,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden