Skip to content

Instantly share code, notes, and snippets.

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