[Feature] Client #3

Merged
javier merged 7 commits from feature/client into main 2023-04-19 14:33:49 +00:00
Showing only changes of commit bfc231b5ec - Show all commits

View File

@ -0,0 +1,34 @@
import Foundation
extension DateFormatter {
// MARK: Formatters
static let dateOnly = {
let formatter = DateFormatter()
formatter.timeZone = .init(secondsFromGMT: 0)
formatter.dateFormat = .Format.yearMonthDay
return formatter
}()
static let dateAndTime = {
let formatter = DateFormatter()
formatter.timeZone = .init(secondsFromGMT: 0)
formatter.dateFormat = .Format.dateAndTimeWithMicroseconds
return formatter
}()
}
// MARK: - String+Format
private extension String {
enum Format {
static let yearMonthDay = "yyyy-MM-dd"
static let dateAndTimeWithMicroseconds = "yyyy-MM-dd'T'HH:mm:ss.SSS"
}
}