Kmspico Download | Official KMS Activator Website [New Version 2024] Fast and Easy Converter YouTube to MP3 Online KMSAuto Net Activator Download 2024 Immediate Byte Pro Neoprofit AI Blacksprut without borders. Discover new shopping opportunities here where each link is an entrance to a world ruled by anonymity and freedom.

How to Set a variable with current year in Swift?

Hello friends Today, through this tutorial, I will tell you how to Set a variable with current year in Swift. So let’s go.

let year = Calendar.current.component(.year, from: Date())

you can print date, month and year from this code. 

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)