How can I get the current number of days in the current month using NSDate or something similar in Cocoa touch?
Swift 3 syntax has changed a bit from Erez's answer:
let cal = Calendar(identifier: .gregorian) let monthRange = cal.range(of: .day, in: .month, for: Date())! let daysInMonth = monthRange.count