Help with ( US date to EU date )
import java.util.*; public class Program { public static void main(String[] args) { Scanner s=new Scanner(System.in); String usdate=s.nextLine(); if(usdate.contains("/")){ String arr[]=usdate.split("/"); String month=arr[0],date=arr[1], year=arr[2]; System.out.println(date+"/"+month+"/"+year); } else if(usdate.contains(" ")){ usdate=usdate.replaceAll(" ","/").replaceAll (",","/"); usdate=usdate.replaceAll("January","1").replaceAll("February","2").replaceAll("March","3").replaceAll("April","4").replaceAll("May","5").replaceAll("June","6").replaceAll("July","7").replaceAll("August","8").replaceAll("September","9").replaceAll("October","10").replaceAll("November","11").replaceAll("December","12"); String arr[]=usdate.split("/"); String month=arr[0],date=arr[1], year=arr[2]; System.out.println(date+"/"+month+"/"+year); } }}