From 174acb50a5c166ce16c7c784337da2b43cb6ef21 Mon Sep 17 00:00:00 2001 From: Ralph Kuepper Date: Thu, 16 Jan 2020 10:20:17 +0100 Subject: [PATCH] Corrections and updated tests --- .../contents.xcworkspacedata | 7 +++++++ .../UserInterfaceState.xcuserstate | Bin 0 -> 21217 bytes .../xcschemes/xcschememanagement.plist | 14 +++++++++++++ Sources/String+SwiftyDates.swift | 19 +++++++++++------- SwiftyDatesTests/SwiftyDatesTests.swift | 12 ++++++++--- 5 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 .swiftpm/xcode/package.xcworkspace/xcuserdata/amlug.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 .swiftpm/xcode/xcuserdata/amlug.xcuserdatad/xcschemes/xcschememanagement.plist diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/.swiftpm/xcode/package.xcworkspace/xcuserdata/amlug.xcuserdatad/UserInterfaceState.xcuserstate b/.swiftpm/xcode/package.xcworkspace/xcuserdata/amlug.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..167ae2f816c186cc5a9b91b449fa3ea75aae19d8 GIT binary patch literal 21217 zcmeHvd3;kv*YM1}w|kSOOVXxm+O$oZHf>ty!rpyhX-gM&C?QSTK%0~#g_cDo$RdaW zf-Hha%Pt6t$|fqPfGBPth=PbB0)mK&pn~w7xwq*8=<~eq@B8y@2$?(UnVGZCnLDnb z&ST|>X3-_T9WVJGa2U9c;5 z!|pf$%W)tM!ofHMM_?t6#4$J?r{Xl+7w6zyoQM14B3z71a5)}^hvQLrG}hrNY{1pH z4%g!b+=QF)6il!k&&5yRr|}BB5qU%zoxg z<}K!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cP3fT& zDZP{d$|z;LGC`?TCM$a=dnx-U`zbS({gp$NqeLR8k#QOBb$MqQ5j zG3r{>^{8K>ZbsdX`ZMZo)V=7S=$_GIqDl0|==Yo1tYE^Ae?Nsen?N#kp9aO!mI;?tM z^@Zwt)fLrM)pgZxs#~f*Rd-@sW87mrW4vNU#?;14jd?7_9y2RuZp{3cr(zbxEQwhb zvn6I*%=Va87PC8MZ_FDpZ^ayl`8wuqtRglmwl;Qt?Dp7?Vz0&i9{We^o!GzC z&T22Ux7t@NRr{;u>S%SGTBFv2(VeF5q3)&buO6x%r5>Z!sjI;ZAFr-cPgOqw=J*iFy(v4_l?hp&x#)qKP-N9d}aK&_?mcQd>xqh)8k3} zQ}NHlFO6RwzdC+Rd`tYg_?_`@$G;PQDE|HU592?IKNEi`{-(x7 zYr-@UniNgCrl+R2rk^HDldCDv4A2bH6l;cSsx;Fzi!_@w`!%0wt|TxC;sn2h9tjx< znF%EcqZ6tUY7)jL)F;>yCMQfun4T~rVQ0ce2|pzKobXq|--#%ZO>|ClOY}$#NDNDi zNQ_F1flF`6i7AQci9Hkb;C6U3@o?ftiC-rEkoZ&Ljl|y)ZzcY%MOs$ttaa6TYkjqH zZM0US)oQzGQ?-4x8QN@Zp0+?cSX-_gtF71Cw3D?{w9~b-v~#udwNGgmYFB7q&~DBz z&mWSn&u_@L=1{(`p(4ip?M_@Lle!O4QN Z1?LLBEw~`)-V7uBa@V`);;7)_{{ueC`sM%t literal 0 HcmV?d00001 diff --git a/.swiftpm/xcode/xcuserdata/amlug.xcuserdatad/xcschemes/xcschememanagement.plist b/.swiftpm/xcode/xcuserdata/amlug.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..29e0fe0 --- /dev/null +++ b/.swiftpm/xcode/xcuserdata/amlug.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + SwiftyDates.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/Sources/String+SwiftyDates.swift b/Sources/String+SwiftyDates.swift index 9927e1e..0ba13f0 100644 --- a/Sources/String+SwiftyDates.swift +++ b/Sources/String+SwiftyDates.swift @@ -15,9 +15,8 @@ extension String { var second: Double = 0 var offset: Double = 0 - var cleanedTime = self.replacingOccurrences(of: "[a-zA-Z]", with: "", options: .regularExpression) - let sep: Character = self.contains(".") && !self.contains(":") ? "." : ":" - + var cleanedTime = self.replacingOccurrences(of: "[a-zA-Z]", with: "", options: .regularExpression).replacingOccurrences(of: " ", with: "") + let sep: Character = (self.contains(".") && !self.contains(":")) ? "." : ":" if (self.contains("-") || self.contains("+")) { let sign: Double = self.contains("-") ? -1 : 1 @@ -50,10 +49,6 @@ extension String { } public func swiftyDate(calendar:Calendar = Calendar.current) -> Date? { - if let timestamp = TimeInterval(self) { - return Date(timeIntervalSince1970: timestamp) - } - // is this even a string we can work with? if (self.count < 1) { return nil } @@ -128,6 +123,7 @@ extension String { } } else { let intValue = Int(self) ?? 0 + print("int value is: ", intValue) if (self.count == 4 || intValue > 12) { year = intValue } else { @@ -142,6 +138,13 @@ extension String { if (year! < 50) { year = 2000 + year! } + + if year! > 5000 { + if let timestamp = TimeInterval(self) { + return Date(timeIntervalSince1970: timestamp) + } + } + let components = DateComponents(calendar: calendar, year: year, month: month, day: day) return components.date } @@ -163,10 +166,12 @@ extension String { if let pos = index(of: " ") { date = String(self[..