Can anyone give me some idea what is wrong with this approach? thank you
func getTodaysDate() -> String {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "dd-MM-YY"
return dateFormatter.string(from: Date())
Can anyone give me some idea what is wrong with this approach? thank you
func getTodaysDate() -> String {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "dd-MM-YY"
return dateFormatter.string(from: Date())