수정 당신의 가정 "24/4월/14"이탈리아어로 (JodaTime와 JDK 모두 말 : D-MMM-YYYY는) 내가 이런 식으로 발견 : 그런데
String input = "24-apr-2014";
Locale locale = Locale.ITALY;
DateTimeFormatter dtf = DateTimeFormat.mediumDate().withLocale(locale);
LocalDate date = dtf.parseLocalDate(input);
int dayOfMonth = date.getDayOfMonth();
int month = date.getMonthOfYear();
int year = date.getYear();
DecimalFormat df = new DecimalFormat("00");
String dayOfMonthAsText = df.format(dayOfMonth);
String monthAsText = df.format(month);
String yearAsText = new DecimalFormat("0000").format(year);
System.out.println(dayOfMonthAsText); // 24
System.out.println(monthAsText); // 04
System.out.println(yearAsText); // 2014
을, 왜 당신이 원하는 않습니다 구문 분석 된 정수 값뿐만 아니라 텍스트 구성 요소를 추출하려면 (많은 추가 서식 작업으로 이어진다 - 내 코드 참조)? 아니면 내가 너를 오해 했니?
감사합니다 !!! :) 그것은 나를 위해 아주 잘 작동! – user3449772