     }
     
 }
+
+
+private extension Date {
+    
+    var relativeDayString: String? {
+        let now = Date()
+        let yesterday = Calendar.current.date(byAdding: .day, value: -1, to: now)
+        if isSameDay(as: yesterday) {
+            return NSLocalizedString("Yesterday", comment: "Relative date string for previous day")
+        }
+        if isSameDay(as: now) {
+            return NSLocalizedString("Today", comment: "Relative date string for current day")
+        }
+        let tomorrow = Calendar.current.date(byAdding: .day, value: 1, to: now)
+        if isSameDay(as: tomorrow) {
+            return NSLocalizedString("Tomorrow", comment: "Relative date string for next day")
+        }
+        return nil
+    }
+    
+    func isSameDay(as date: Date?) -> Bool {
+        guard let date = date else { return false }
+        return Calendar.current.isDate(date, inSameDayAs: self)
+    }
+    
+}

            datePicker.datePickerMode = .time
            dateFormatter.timeStyle = .short
            dateFormatter.dateStyle = .full
            currentButtonTitle = NSLocalizedString("Set to current date/time", comment: "Button title to set date to current date and time")
        } else if computedCapabilities.contains(.timeOnly) {
            datePicker.datePickerMode = .time

    // MARK: - Private properties
    
    fileprivate lazy var dateFormatter = DateFormatter()
    fileprivate lazy var timeFormatter = DateFormatter()
    fileprivate let backgroundView = UIView()
    fileprivate let blurView = UIVisualEffectView(effect: UIBlurEffect(style: .extraLight))
    fileprivate var date: Date?
