         return calendar.dateComponents([.calendar, .timeZone,
                                         .year, .month, .day,
                                         .hour, .minute,
-                                        .weekday, .weekOfYear, .yearForWeekOfYear], from: date!)
+                                        .weekday, .weekOfYear, .year], from: date!)
     }
 
     private func markfordelete() {

        let datesnapshotstring = (self.snapshotsloggdata!.snapshotslogs![index].value(forKey: "dateExecuted") as? String)!
        if self.datecomponentsfromstring(datestring: datesnapshotstring).weekOfYear ==
            self.datecomponentscurrent!.weekOfYear &&
            self.datecomponentsfromstring(datestring: datesnapshotstring).yearForWeekOfYear == self.datecomponentscurrent!.yearForWeekOfYear {
            self.snapshotsloggdata?.snapshotslogs![index].setValue("this week", forKey: "period")
            return true
        }

        let datesnapshotstring = (self.snapshotsloggdata!.snapshotslogs![index].value(forKey: "dateExecuted") as? String)!
        if self.datecomponentsfromstring(datestring: datesnapshotstring).month ==
            self.datecomponentscurrent!.month &&
            self.datecomponentsfromstring(datestring: datesnapshotstring).year == self.datecomponentscurrent!.year {
            if self.datefromstring(datestring: datesnapshotstring).isWeekday() {
                self.snapshotsloggdata?.snapshotslogs![index].setValue("this month", forKey: "period")
                return true
