let monthAsNr = Calendar.current.component(.month, from: Date())let currentDate = Date() let nameFormatter = DateFormatter() nameFormatter.dateFormat = "MMMM" // format January, February, March, ... let name = nameFormatter.string(from: currentDate) let index = Calendar.current.component(.month, from: currentDate) // format 1, 2, 3, ... print(name) // April print(index) // 4