DateFormatter's returns nil for specific date strings without time in Swift

Solution 1:

You just need to set your date formatter calendar property:

Xcode 8.2.1 • Swift 3.0.2

let dateFormatter = DateFormatter()
dateFormatter.calendar = Calendar(identifier: .iso8601)
dateFormatter.locale = Locale(identifier: "es")
dateFormatter.dateFormat = "dd 'de' MMMM"
dateFormatter.date(from: "8 de octubre")   // "Oct 8, 2000, 1:00 AM"