]> git.r.bdr.sh - rbdr/map/blob - Map/Core Extensions/Date+format.swift
d29ed0f0fc20a617722c1a17534cc8aae7403246
[rbdr/map] / Map / Core Extensions / Date+format.swift
1 //
2 // Date+format.swift
3 // Map
4 //
5 // Created by Ruben Beltran del Rio on 2/1/21.
6 //
7
8 import Foundation
9
10 extension Date {
11 func format() -> String {
12 let formatter = DateFormatter()
13 formatter.dateStyle = .short
14 formatter.timeStyle = .medium
15 return formatter.string(from: self)
16 }
17 }