         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(datestring: nil)
+        self.datecomponentscurrent = self.datecomponentsfromstring(datestringlocalized: nil)
         self.reset()
         self.markfordelete()
     }

    // 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 !=
            self.datecomponentscurrent!.month {
            if self.isselectedDayinWeek(date: self.datefromstring(datestring: datesnapshotstring)) == true {
                self.snapshotsloggdata?.snapshotslogs![index].setValue(self.daylocalized[self.day!.rawValue - 1] + " " +
                    NSLocalizedString("prev months", comment: "plan"), forKey: "period")
                return false

    // Keep all snapshots current week.
    private func currentweek(index: Int) -> Bool {
        let datesnapshotstring = (self.snapshotsloggdata!.snapshotslogs![index].value(forKey: "dateExecuted") as? String)!
        if self.datecomponentsfromstring(datestringlocalized: datesnapshotstring).weekOfYear ==
            self.datecomponentscurrent!.weekOfYear &&
            self.datecomponentsfromstring(datestringlocalized: datesnapshotstring).year == self.datecomponentscurrent!.year {
            self.snapshotsloggdata?.snapshotslogs![index].setValue(NSLocalizedString("this week", comment: "plan"), forKey: "period")
            return true
        }
