I want to get the monday of this week at the 00:00:00 in base of locale.
This is my code:
func getMonday() -> NSDate {
var mondaysDate: NSDate {
let iso8601 = NSCalendar(calendarIdentifier: NSCalendarIdentifierISO8601)!
return iso8601.dateFromComponents(iso8601.components([.YearForWeekOfYear, .WeekOfYear ], fromDate: NSDate()))!
}
return mondaysDate
}
This function get the last Sunday at 22:00:00 +0000. How can I resolve this issue?