I have the following code
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd-MMM-yyyy").withLocale(Locale.US);
formatter.parseDateTime("10-23-2012");
Why am I getting the following exception?
nested exception is java.lang.IllegalArgumentException: Invalid format: "10-23-2012" is malformed at "23-2012"
After reading the javadoc, I still can figure this out. The lowercase d (day of month) is supposed the represent minimum number of digits, but according to the exception it is getting truncated? Any ideas?