diff --git a/AppleLibs.xcodeproj/project.pbxproj b/AppleLibs.xcodeproj/project.pbxproj index 23ff45a9ccd4bfa3187f9e08eb7585f4d18277b5..9bfc3b50bdb236d52d11dc829242b8b15124a652 100644 --- a/AppleLibs.xcodeproj/project.pbxproj +++ b/AppleLibs.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + F68C2D422616482A00042967 /* IsoDateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F68C2D412616482A00042967 /* IsoDateFormatter.swift */; }; F6A251A0260B670000132DEC /* AppleLibs.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6A25196260B66FF00132DEC /* AppleLibs.framework */; }; F6A251A5260B670000132DEC /* AppleLibsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6A251A4260B670000132DEC /* AppleLibsTests.swift */; }; F6A251A7260B670000132DEC /* AppleLibs.h in Headers */ = {isa = PBXBuildFile; fileRef = F6A25199260B66FF00132DEC /* AppleLibs.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -25,6 +26,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + F68C2D412616482A00042967 /* IsoDateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IsoDateFormatter.swift; sourceTree = "<group>"; }; F6A25196260B66FF00132DEC /* AppleLibs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AppleLibs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F6A25199260B66FF00132DEC /* AppleLibs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleLibs.h; sourceTree = "<group>"; }; F6A2519A260B66FF00132DEC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; @@ -55,6 +57,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + F68C2D402616482000042967 /* Date */ = { + isa = PBXGroup; + children = ( + F68C2D412616482A00042967 /* IsoDateFormatter.swift */, + ); + path = Date; + sourceTree = "<group>"; + }; F6A2518C260B66FF00132DEC = { isa = PBXGroup; children = ( @@ -77,6 +87,7 @@ F6A25198260B66FF00132DEC /* AppleLibs */ = { isa = PBXGroup; children = ( + F68C2D402616482000042967 /* Date */, F6A251B8260B696200132DEC /* Numbers */, F6A251BD260B699100132DEC /* String+Extended.swift */, F6A25199260B66FF00132DEC /* AppleLibs.h */, @@ -212,6 +223,7 @@ buildActionMask = 2147483647; files = ( F6A251BA260B697300132DEC /* Double+Rounded.swift in Sources */, + F68C2D422616482A00042967 /* IsoDateFormatter.swift in Sources */, F6A251BE260B699100132DEC /* String+Extended.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/AppleLibs/Date/IsoDateFormatter.swift b/AppleLibs/Date/IsoDateFormatter.swift new file mode 100644 index 0000000000000000000000000000000000000000..8acd07e83f575a970e9cd8204f20b3689280dbb8 --- /dev/null +++ b/AppleLibs/Date/IsoDateFormatter.swift @@ -0,0 +1,20 @@ +// +// IsoDateFormatter.swift +// AppleLibs +// +// Created by Tobias on 01.04.21. +// + +import Foundation + + +public 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) + return formatter + }() +}