Hi guys!
Below is the code for the task, it formats everything correctly, but the alst requirement is not met, is it problem with date format?
package pl.codegym.task.task09.task0922;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
/*
Jaka dzisiaj jest data?
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s = reader.readLine();
//String sa = s;
SimpleDateFormat format= new SimpleDateFormat("yyyy-MM-dd");
Date date = format.parse(s);
SimpleDateFormat format2 = new SimpleDateFormat("dd-MM-yyyy");
String sDate = format2.format(date);
System.out.println(sDate);
}
}