Skip to content

Instantly share code, notes, and snippets.

View aligungor's full-sized avatar

Ali Güngör aligungor

  • SEB
  • Riga, Latvia
View GitHub Profile
import Foundation
extension DateFormatter {
static let iso8601Full: DateFormatter = {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"
formatter.calendar = Calendar(identifier: .iso8601)
formatter.timeZone = TimeZone(secondsFromGMT: 0)
formatter.locale = Locale(identifier: "en_US_POSIX")
return formatter
@aligungor
aligungor / codeableEnum.swift
Created October 31, 2017 14:20 — forked from mbuchetics/codeableEnum.swift
Implement Codable on an enum
struct User: Codable {
var name: String
var email: String
var id: String
var metadata: [String: MetadataType]
enum CodingKeys: String, CodingKey {
case name, email, id, metadata
}
}