import Foundation
let date = Date()
// Get the current calendar
let calendar = Calendar.current
// Extract the week of the year from the date
if let weekOfYear = calendar.dateComponents([.weekOfYear], from: date).weekOfYear {
print("Week number: \(weekOfYear)")
} else {
print("Could not calculate the week number.")
}
/*
run:
Week number: 11
*/