Summary: YYYY-MMM-DD is better because you don't have possible confusion.
Which date format is best?
In more formal, international contexts yyyy-mm-dd is the preferred allowed format.
What is MMM in date format?
In Java, The MMM format for months is a short form of the month using 3 characters. SimpleDateFormat class is used for implementing this format in java and you can import this package by using the following code.
Why is American date format different?
America inherited the months-first dates from the United Kingdom where it was occasionally used until the early 20th century, according to Reddit. American colonists favoured the monthly format, while the British Empire drifted towards the European style of dd-mm-yyyy.