Hi,
A client of our App as reported an issue that is date of birth is not right on the app.
as we checked the bug we have notice that this specific dates fail parsing from string to date.
the following String always fail "1991-03-24'T'00:00:00"
class func convertStringToDate(DateString : String) -> Date
{
let dateFormatter : DateFormatter = DateFormatter()
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss"
if let date = dateFormatter.date(from: (DateString)) {
return date;
}
return Date()
}
Please Help.
Selecting any option will automatically load the page