import UIKit
let date : Date = Date()
let cal: Calendar = Calendar(identifier: .gregorian)
let startOfToday = cal.startOfDay(for: date)
let endOfToday = cal.date(byAdding: .day, value: 1, to : startOfToday)!
print(startOfToday)
为什么startOfToday在传递打印功能时会有所不同?
我想得到相同的结果“2018年3月1日”