I want to show a date as Saturday June 13.
If the date is current day it should display Today like that Tomorrow, Yesterday.
I couldn't achieve both
guard let date = Date(fromString: "16 September 2020",
format: "dd MMMM yyyy") else { return nil }
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .medium
dateFormatter.doesRelativeDateFormatting = true
header.titleLabel.text = dateFormatter.string(from: date)
For the above code I can show date as Today Tomorrow Yesterday but other dates are not showing Saturday June 13. I tried to apply date format dateFormatter.dateFormat = "EEEE, MMM d"
for the same dateFormatter
it returned nothing.