I want to check if a given string is in a particular dateformat. If not user should be able to throw error message.
DateTimeFormat format=DateTimeFormat.getFormat("yyyy-MM-dd");
Date d= format.parse("1990-10-");
with this input , it should give error. I tried with try and catch , but its not throwing any exception.
2013-08-12is in the formatyyyy-MM-dd(12 August 2013) oryyyy-dd-MM(8 December 2013).