From fd35a00e6314a6cd1e2ccdffac3aed6c6949fa58 Mon Sep 17 00:00:00 2001 From: Abhishek Banthia <8280282+n0shake@users.noreply.github.com> Date: Thu, 31 Mar 2022 21:06:07 -0400 Subject: [PATCH] Update Date+Inits.swift --- .../Date Additions/Date+Inits.swift | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/Clocker/Dependencies/Date Additions/Date+Inits.swift b/Clocker/Dependencies/Date Additions/Date+Inits.swift index a4ddaaa..27eefb4 100755 --- a/Clocker/Dependencies/Date Additions/Date+Inits.swift +++ b/Clocker/Dependencies/Date Additions/Date+Inits.swift @@ -41,47 +41,4 @@ public extension Date { } self = date } - - /** - * Init date with components. Hour, minutes, and seconds set to zero. - * - * - parameter year: Year component of new date - * - parameter month: Month component of new date - * - parameter day: Day component of new date - */ - init(year: Int, month: Int, day: Int) { - self.init(year: year, month: month, day: day, hour: 0, minute: 0, second: 0) - } - - /** - * Init date from string, given a format string, according to Apple's date formatting guide, and time zone. - * - * - parameter dateString: Date in the formatting given by the format parameter - * - parameter format: Format style using Apple's date formatting guide - * - parameter timeZone: Time zone of date - */ - init(dateString: String, format: String, timeZone: TimeZone) { - let dateFormatter = DateFormatter() - dateFormatter.dateStyle = .none - dateFormatter.timeStyle = .none - dateFormatter.timeZone = timeZone - dateFormatter.dateFormat = format - - guard let date = dateFormatter.date(from: dateString) else { - self = Date() - return - } - self = date - } - - /** - * Init date from string, given a format string, according to Apple's date formatting guide. - * Time Zone automatically selected as the current time zone. - * - * - parameter dateString: Date in the formatting given by the format parameter - * - parameter format: Format style using Apple's date formatting guide - */ - init(dateString: String, format: String) { - self.init(dateString: dateString, format: format, timeZone: TimeZone.autoupdatingCurrent) - } }