final String dateString = "Jan 2, 2012";
final DateTimeFormatter dtf = new DateTimeFormatterBuilder().appendMonthOfYearShortText().appendLiteral(" ").appendDayOfMonth(1).appendLiteral(", ").appendYear(4, 4).toFormatter();
final DateTime jodaDate = dtf.parseDateTime(dateString);
System.out.println(jodaDate);
final Date javaDate = new Date(jodaDate.getMillis());
System.out.println(javaDate);
出力は
です2012-01-02T00:00:00.000+02:00
Mon Jan 02 00:00:00 EET 2012
次の目的:
final String dateString = "Jan 1, 2012";
出力は次のとおりです:
2012-01-01T00:00:00.000+02:00
Sun Jan 01 00:00:00 EET 2012