fabi.s

Generation

generate functionSat, 05 Nov 2022

get date

func getDate() -> String { let date = Date() let calendar = Calendar.current let year = calendar.component(.year, from: date) let month = calendar.component(.month, from: date) let day = calendar.component(.day, from: date) return "\(month)/\(day)/\(year)" } getDate()

Want to kickstart your project?Use the new AI Studio to create your code