parse method not handling formatting correctly : parse method not handling formatting correctly
parse method not handling formating correctly
parse method not handling formatting correctly.    

    import java.time.Period;
    import java.time.format.DateTimeFormatter;
    import java.time.format.DateTimeParseException;
    import java.io.*;
    import java.time.*;

    //Main class
    public class TimeBetween{
	public static void main(String[] args){
		String dateFormat = "MMMM d, yyyy";
		LocalDate aDate = null;
		boolean validStr = false;
		
     //parse method not handling formatting correctly.
		DateTimeFormatter formatter = DateTimeFormatter.ofPattern(dateFormat);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while(validStr==false){
			System.out.print("Enter a date: ");
    //Try and catch 
			try {
				String dateEntered = br.readLine();
				aDate = LocalDate.parse(dateEntered,formatter);
				validStr = true;
			}catch(IOException | DateTimeParseException ex){
				validStr = false;
			}
			
		}
		
		System.out.println("Date entered was: "+aDate);
		LocalDate now = LocalDate.now(); 
		
		Period between;
		if(aDate.isBefore(now)){
			between = Period.between(aDate,now);
		}else{
			between = Period.between(now,aDate);
		}
		
		int years = between.getYears();
		int months = between.getMonths();
		int days =  between.getDays();
		
    //Printing out year month and day differences
		System.out.println("There are"    +years+"years"+months+"months"+days+"days");
	    }
    }

parse method not handling formatting correctly
parse method not handling formatting correctly
parse method not handling formatting correctly
parse method not handling formatting correctly