Get the day name (example: Monday, Tuesday, ..... ) from a selected date from datepicker
let day = dateFormatter.string(from: date)
To get the weekday do the following:
let dateFormatter = DateFormatter()
var weekday: String = ""
dateFormatter.dateFormat = "cccc"
weekday = dateFormatter.string(from: date)
Read more about the different formats here: http://userguide.icu-project.org/formatparse/datetime
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With