objective c - How to validate string date is in the ISO 8601 date format before applying correct NSDateFormatter? -
remote api's date format expected change in future current custom format iso 8601. looking efficient way validate string date format before converting nsdate using proper nsdateformatter.
the easiest way validate format try converting string using date formatter. if returns nil
format isn't match , can try other format.
Comments
Post a Comment