Format date and time but exclude "today date" in Swift?
My code: let dateFormatter = DateFormatter() dateFormatter.timeStyle = .short dateFormatter.dateStyle = .short dateFormatter.locale = .current lblDateTime.text = dateFormatter.string(from: date) The problem is I need dateFormatter.dateStyle = .none for today date. How to resolve it correctly? Is it possible to avoid manual date calculations to determine "today date"? >Solution : You can check if the given… Read More Format date and time but exclude "today date" in Swift?