I am new to swift 3, the way I found is
extension Date
{
init(dateString:String) {
let dateStringFormatter = DateFormatter()
dateStringFormatter.dateFormat = "yyyy-MM-dd"
dateStringFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") as Locale!
let d = dateStringFormatter.date(from: dateString)!
self(timeInterval:0, since:d)
}
}`
in self(timeInterval:0, since:d)
raise error Cannot call value of non-function type 'Date'
also I doesn't see this error before. Anyone please help me and explain itChange to: self.init(timeInterval:0, since:d)
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments