I want to try parse so simple date on Java-11.
Date language is: Hebrew Date format is: "MMM YYYY dd" Example date is: "18 אוק 2010"
And my code looks like:
DateTimeFormatter f = DateTimeFormat.forPattern("MMM YYYY dd")
.withLocale(Locale.forLanguageTag("iw-IL"));
String dateInString = "18 אוק 2010";
Date d = f.parseDateTime(dateInString).toDate();
System.out.println(d);
But when I try it, I get an error like:
Exception in thread "main" java.lang.IllegalArgumentException: Invalid format: "18 אוק 2010" is malformed at "אוק 2010"
at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:945)
Is there any suggestion?