I start out with:
var weekdays = ["Sunday", "Friday", "Tuesday"]
I need it changed to:
weekdays = ["Sunday", "Tuesday", "Friday"]
I've converted them to Ints:
var days = [Int]()
for day in weekdays {
let formatterWeekday = NSDateFormatter()
formatterWeekday.dateFormat = "e"
let weekday = formatterWeekday.dateFromString(day)
let weekdayString = formatterWeekday.stringFromDate(weekday!)
let dayInt = Int(weekdayString)
days.append(dayInt!)
}
days.sortInPlace()
Which then gives me:
days = [1,3,6]
So then how do I convert Ints to weekday strings?