Currently browsing tag

swift

swift 4 – 國曆轉農曆

let dateAt: String = “2016/1/1” let dateFormatter: DateFormatter = DateFormatter() dateFormatter.dateFormat = “yyyy/MM/dd” let dateComps: NSDateComponents = NSCalendar(calendarIdentifier: NSCalendar.Identifier.chinese)!.components([.year, .month, .day], from: …