      @param basis: the unit for the repeat interval.
      */
     public func repeatEvery(_ basis: NotificationBasis) -> Self {
-        let calendar = NSCalendar.current
+        let calendar = Calendar.current
 
         timeZone = calendar.timeZone
         

            dateComponents.second = 0
            
        case .day(let time):
            dateComponents = NSCalendar.current.dateComponents([.hour, .minute, .second], from: time)
            
        case .week(let time, let weekday):
            dateComponents = NSCalendar.current.dateComponents([.year, .hour, .minute, .weekOfYear], from: time)
            dateComponents.weekday = weekday.rawValue
        }
        

     Returns the next date after the current date with given an hour and a minute.
     */
    var nextDate: Date? {
        let calendar = Calendar.current
        let components = calendar.dateComponents([.hour, .minute], from: self)
        
        return calendar.nextDate(after: Date(), matching: components, matchingPolicy: .nextTimePreservingSmallerComponents)
