Skip to content

Instantly share code, notes, and snippets.

@AlexPinhasov
Last active February 24, 2019 08:04
Embed
What would you like to do?
private func locateCorrectFormat(for dateString: String) -> Date {
for dateFormat in DateFormats.allCases {
if let date = parse(dateString, using: dateFormat) {
return date
}
}
return useRegexToExtractDate(from: dateString)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment