NSDate相关
let timeInterval = NSDate().timeIntervalSince1970
print (timeInterval)
let days = Int(timeInterval / 86400)
print (days)
let intValue = (days - 3) % 7
print(intValue)
let date = NSDate()
print (date)
let dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "EEEE"
let today = dateFormatter.stringFromDate(date)
print (today)
打印输出