This is my code:
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
String exp_date="2015-08-28";
try {
Log.v("dateformat111","is "+exp_date);
Date exp_dateFormated = format.parse(exp_date);
Log.v("dateformat111","is "+exp_dateFormated);
} catch (ParseException e) {
Log.v("dateformat111","did not found date");
e.printStackTrace();
}
And the catch is being called so something went wrong
Log :
09-24 12:21:34.931 19014-19014/? V/dateformat111﹕ did not found date
Exception :
java.text.ParseException: Unparseable date: "2015-08-28"
Not a duplicate of How to parse a date? the string I'm parsing is the same format of SimpleDateFormat "yyyy-MM-dd" ,"2015-08-28"
I found out what is causing the exception with English (ltr) as phone language my code works but when change it to Arabic (rtl) the exception is thrown, why is that?