DateFormatter
.dateStyle
.timeStyle
それぞれの出力結果
short.swift
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .short
dateFormatter.timeStyle = .short
print(dateFormatter.string(from: Date()))
// 12/23/20, 1:42 PM
medium.swift
dateFormatter.dateStyle = .medium
dateFormatter.timeStyle = .medium
print(dateFormatter.string(from: Date()))
// Dec 23, 2020 at 1:42:57 PM
short.swift
dateFormatter.dateStyle = .short
dateFormatter.timeStyle = .short
print(dateFormatter.string(from: Date()))
// December 23, 2020 at 1:42:57 PM GMT+9