2
等號我添加了一個Date
擴展,像這樣的公曆的變量:兩人在表達斯威夫特
extension Date {
struct Gregorian {
static let calendar = Calendar(identifier: .gregorian)
}
}
我想補充另一個static var
公曆結構內的壓光機,其中firstWeekday = 2
。這樣的事情:
struct Gregorian {
static let calendar = Calendar(identifier: .gregorian)
static let calender2 = Calendar(identifier: .gregorian).firstWeekday = 2
}
但是,我不能有兩個=
聲明。我如何正確實現添加這個新的結構成員?