NSDateComponentsFormatter's stringFromDate(_, toDate:) returns nil
Question Why is string nil? let formatter = NSDateComponentsFormatter() let referenceDate = NSDate(timeIntervalSinceReferenceDate: 0) let intervalDate = NSDate(timeInterval: 3628810, sinceDate: referenceDate) let string = formatter.stringFromDate(referenceDate, toDate: intervalDate) I'm expecting a string like "6w 10s" to be returned. (6 weeks is 3,628,800 seconds.) Attempted Troubleshooting To troubleshoot, I tried setting allowedUnits : formatter.allowedUnits = .YearCalendarUnit | .MonthCalendarUnit | .WeekCalendarUnit | .DayCalendarUnit | .HourCalendarUnit | .MinuteCalendarUnit |