My output is "JUN 08 2014", I've tried rewriting and restructuring it several times, but I can't seem to get any change. Can anybody help with this?
package com.codegym.task.task09.task0922;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
/*
What's today's date?
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
SimpleDateFormat oldformat = new SimpleDateFormat("yyyy-dd-MM", Locale.ENGLISH);
Date olddate = oldformat.parse(br.readLine());
SimpleDateFormat newformat = new SimpleDateFormat("MMM dd, yyyy", Locale.ENGLISH);
String newdate = newformat.format(olddate);
System.out.print(newdate.toUpperCase());
}
}