@@ -0,0 +1,1906 @@
+package ru.napadovskiu.parseDate;%0A%0Aimport java.text.ParseException;%0Aimport java.text.SimpleDateFormat;%0Aimport java.time.Duration;%0Aimport java.time.Instant;%0A%0Aimport java.util.Date;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Apublic class ParseDate %7B%0A%0A    private Map%3CString, String%3E mapMounts = new HashMap%3C%3E();%0A%0A%0A    public ParseDate() %7B%0A        this.mapMounts.put(%22%D1%8F%D0%BD%D0%B2%22,%2201%22);%0A        this.mapMounts.put(%22%D1%84%D0%B5%D0%B2%22,%2202%22);%0A        this.mapMounts.put(%22%D0%BC%D0%B0%D1%80%22,%2203%22);%0A        this.mapMounts.put(%22%D0%B0%D0%BF%D1%80%22,%2204%22);%0A        this.mapMounts.put(%22%D0%BC%D0%B0%D0%B9%22,%2205%22);%0A        this.mapMounts.put(%22%D0%B8%D1%8E%D0%BD%22,%2206%22);%0A        this.mapMounts.put(%22%D0%B8%D1%8E%D0%BB%22,%2207%22);%0A        this.mapMounts.put(%22%D0%B0%D0%B2%D0%B3%22,%2208%22);%0A        this.mapMounts.put(%22%D1%81%D0%B5%D0%BD%22,%2209%22);%0A        this.mapMounts.put(%22%D0%BE%D0%BA%D1%82%22,%2210%22);%0A        this.mapMounts.put(%22%D0%BD%D0%BE%D1%8F%22,%2211%22);%0A        this.mapMounts.put(%22%D0%B4%D0%B5%D0%BA%22,%2212%22);%0A%0A    %7D%0A%0A    public Date getDateFromString(String stringDate) throws ParseException %7B%0A        Date result = null;%0A        SimpleDateFormat sdf = new SimpleDateFormat(%22yyyy-MM-dd%22);%0A        if(stringDate.contains(%22%D0%B2%D1%87%D0%B5%D1%80%D0%B0%22)) %7B%0A            result = sdf.parse(sdf.format(new Date()));%0A        %7D else if(stringDate.contains(%22%D1%81%D0%B5%D0%B3%D0%BE%D0%B4%D0%BD%D1%8F%22)) %7B%0A            Instant now = Instant.now(); //current date%0A            Instant before = now.minus(Duration.ofDays(1));%0A%0A            Date dateBefore = Date.from(before);%0A            result = sdf.parse(sdf.format(dateBefore));%0A        %7D else %7B%0A%0A            String sDay = stringDate.substring(0,2);%0A            String strMounth = stringDate.substring(sDay.length(),sDay.length()+4);%0A            String sMounth = this.mapMounts.get(strMounth.replaceAll(%22 %22,%22%22));%0A            String sYear = stringDate.substring(sDay.length()+strMounth.length(),sDay.length()+strMounth.length()+2);%0A            String strDate = new String(sYear+%22-%22+sMounth+%22-%22+sDay);//+%22 %22+sHour+%22:%22+sMin);%0A            result = sdf.parse(strDate);%0A        %7D%0A%0A        return result;%0A    %7D%0A%0A%0A%0A%7D%0A

work with final task