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();
Date date = new SimpleDateFormat("yyyy-mm-dd").parse(s);
SimpleDateFormat dateformat = new SimpleDateFormat("dd-mm-yyyy");
System.out.println(dateformat.format(date));
}
}
// why the task does not work if the result is correct
Bug in polish version - task date 09 lvl 11 lesson
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Guadalupe Gagnon
23 January 2020, 15:22
The output for this code does not seem to be correct. When I enter "2013-08-18" the output should be "AUG 18, 2013", but this code outputs "18-08-2013"
Unless the requirements between the Polish version and the English version are different You should always share the full solution when asking for help so we can see what the task asks and what parts the validation claims are not correct.
0