答案 0 :(得分:1)
请检查这可能会有所帮助:
var calendar = Calendar.current
calendar.firstWeekday = 4
let startOfWeek = calendar.date(from: calendar.dateComponents([.yearForWeekOfYear, .weekOfYear], from: Date()))!
let endOfWeek = calendar.date(byAdding: .day, value: 6, to: startOfWeek)!
print(startOfWeek)
print(endOfWeek)