How can I check NSString is date or not? For example:
NSString - Jul 14 at 14.55 PM return TRUE
NSString - Talala... return False
Please help..
How can I check NSString is date or not? For example:
NSString - Jul 14 at 14.55 PM return TRUE
NSString - Talala... return False
Please help..
You could use a NSDateFormatter and allow it to use an heuristic to determine if the given input string is a date or not (just call [formatter setLeninent:YES] for this).
If it can create a NSDate object out of your NSString, congratulations, the string contains a date, otherwise it most likely doesn't.
You can try creating a new NSDate instance giving the NSString and check wether the result is nil or not.