     // Keep snapshots all selected day every previous months
     private func previousmonthskeepAllselecteddayofweek(index: Int) -> Bool {
         let datesnapshotstring = (self.snapshotsloggdata!.snapshotslogs![index].value(forKey: "dateExecuted") as? String)!
-        if self.datecomponentsfromstring(datestring: datesnapshotstring).month !=
+        if self.datecomponentsfromstring(datestringlocalized: datesnapshotstring).month !=
             self.datecomponentscurrent!.month {
-            if self.isselectedDayinWeek(date: self.datefromstring(datestring: datesnapshotstring)) == true {
+            if self.isselectedDayinWeek(date: self.datefromstring(datestringlocalized: datesnapshotstring)) == true {
                 self.snapshotsloggdata?.snapshotslogs![index].setValue(self.daylocalized[self.day!.rawValue - 1] + " " +
                     NSLocalizedString("prev months", comment: "plan"), forKey: "period")
                 return false

    // Keep snapshots last selected day every previous months
    private func previousmonthskeepLastselecteddayofweek(index: Int) -> Bool {
        let datesnapshotstring = (self.snapshotsloggdata!.snapshotslogs![index].value(forKey: "dateExecuted") as? String)!
        if self.datecomponentsfromstring(datestring: datesnapshotstring).month !=
            self.datecomponentscurrent!.month {
            if self.islastSelectedDayinMonth(date: self.datefromstring(datestring: datesnapshotstring)) == true {
                self.snapshotsloggdata?.snapshotslogs![index].setValue(NSLocalizedString("last", comment: "plan")
                    + " " + self.daylocalized[self.day!.rawValue - 1] + " " + NSLocalizedString("month", comment: "plan"), forKey: "period")
                return false

        guard self.snapshotsloggdata?.snapshotslogs != nil else { return }
        self.numberoflogs = self.snapshotsloggdata?.snapshotslogs?.count ?? 0
        self.firstlog = Double(self.snapshotsloggdata?.snapshotslogs![0].value(forKey: "days") as? String ?? "0")
        self.datecomponentscurrent = self.datecomponentsfromstring(datestringlocalized: nil)
        self.reset()
        self.markfordelete()
    }
