你好,請幫助我,我已經經歷了很多問題,但沒有得到解決方案。 代碼解析日期西班牙語錯誤
String localDate1="Miércoles, 04 Octubre 2017 12:00 PM";
Locale spanishLocale=new Locale("es", "ES");
SimpleDateFormat spanishLocale1=new SimpleDateFormat(getString(R.string.jom_events_date_input_format_12_hrs),spanishLocale);
String dateInSpanish=spanishLocale1.parse(localDate1).toString();
Log.v("@@@WWW","in Spanish: "+dateInSpanish);
錯誤
java.text.ParseException: Unparseable date: "Miércoles, 04 Octubre 2017 12:00 PM" (at offset 33)
什麼是'值getString(R.string.jom_events_date_input_format_12_hrs)' –
EEEE,dd MMMM yyyy hh:mm a,當我解析englisn日期它的工作原理雖然 –
我的默認語言環境也是「es」 –