Skip to content

Instantly share code, notes, and snippets.

@Pasanpr Pasanpr/dateFormatter.swift Secret
Created Mar 29, 2017

What would you like to do?
import Foundation
struct Formatter {
static let formatter = DateFormatter()
static func date(from string: String) -> Date? {
formatter.dateFormat = "d MMM yyyy"
return string)
let dateStrings = ["10 Oct 1988", "11 Jan 1947", "28 Mar 2002"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.