##Getting the day number of the month
var day = ""
var date = Date()
let formatter = DateFormatter()
formatter.dateFormat = "dd"
day = "\(formatter.string(from: date))"
#####Output: |14| -> which is the 14th day of December
##Getting month of the year with name
var month = ""
var date = Date()
let formatter = DateFormatter()
formatter.dateFormat = "MM"
let monthInt = Int(formatter.string(from: date))
let monthName = formatter.monthSymbols[monthInt! - 1]
month = "\(monthName)"
#####Output: December
##Getting day of the week name
var dayOfWeekName = ""
var date = Date()
let formatter = DateFormatter()
formatter.dateFormat = "EEEE"
dayOfWeekName = "\(formatter.string(from: date))"
#####Output: Wednesday
##Getting year
var year = ""
var date = Date()
let formatter = DateFormatter()
formatter.dateFormat = "yyyy"
year = "\(formatter.string(from: date))"
#####Output: 2016