i'm new in iOs and swift and i don't know how to give a day in format yyyy-mm-dd and a function response with the day of the week like:
2014-08-04 -> Monday ([0])
thanks
to take day of the week try this:
let dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "EEEE"
let dayOfWeekString = dateFormatter.stringFromDate(date)
println(dayOfWeekString)
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