Convert date to "dd.MM.yyyy" format date in swift : I work with an API, where one of parameters is of type Date in format "dd.MM.yyyy".
I cant manage to convert it. I created an extension for Date, where I tried to implement it in next way:
extension Date {
    
    var shortDate: Date {
        let formatter = DateFormatter()
        formatter.dateFormat = "dd.MM.yyyy"
        let strDate = formatter.string(from: self)
        let modifiedDate = formatter.date(from: strDate)
         return modifiedDate!
    }
}

and I call it like that:
 let day = Date().shortDate

but unfortunately it doesn't work and it looks like that:
2017-06-18 21:00:00 +0000

Thanks a lot in advance for any help!

