为什么DateComponentsFormatter.localizedString(from:unitsStyle:)不适用于weekday
let twoDays = DateComponents(day: 2)
let threeWeeks = DateComponents(weekday: 3)
DateComponentsFormatter.localizedString(from: twoDays, unitsStyle: .full) ?? "found nil" // "2 days"
DateComponentsFormatter.localizedString(from: threeWeeks, unitsStyle: .full) ?? "found nil" // returns "found nil"发布于 2022-02-05 22:03:45
https://stackoverflow.com/questions/71002428
复制相似问题