I have used Calendar.current.date(bySettingHour
code for setting particular date. Problem is it takes so long to compile ~4 seconds
print("Time seconds ",Date().timeIntervalSince1970)
for i in 0..<9999 {
let nowDate = Calendar.current.date(bySettingHour: 0, minute: 0, second: 0, of: Date())!
}
print("Time seconds ",Date().timeIntervalSince1970)// For loop took 4 seconds
Is there any way to reduce compile time ?