Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
System.out.println(new SimpleDateFormat("Y-M-d", Locale.US).format(new SimpleDateFormat("GGGGy���M���d���", Locale.forLanguageTag("ja-JP-u-ca-japanese")).parse("������1���5���1���"))) Expected Result: 2019-5-1 Actual Result: java.text.ParseException: Unparseable date: "������1���5���1���" | at DateFormat.parse (DateFormat.java:395) | at (#55:1) On the other hand, System.out.println(new SimpleDateFormat("Y-M-d", Locale.US).format(new SimpleDateFormat("GGGGy���M���d���", Locale.forLanguageTag("ja-JP-u-ca-japanese")).parse("NewEra1-5-1"))) Expected Result: => 2019-5-1 Actual Result: java.text.ParseException: Unparseable date: "NewEra1-5-1" | at DateFormat.parse (DateFormat.java:395) | at (#2:1)
|