JDK-4246972 : Unparseable date in SimpleDateFormat Feb, 29
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 1.2.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_95
  • CPU: x86
  • Submitted: 1999-06-16
  • Updated: 1999-06-22
  • Resolved: 1999-06-22
Related Reports
Duplicate :  
Description

Name: vi73552			Date: 06/16/99


SimpleDateFormat dateFormat = new SimpleDateFormat( "ddMMyyyy" );
dateFormat.setLenient( false );
String buffer = "29021996";
Date d = dateFormat.parse( buffer2.substring( 0, 8 ) );

>>>
java.text.ParseException: Unparseable date: "29021996"

Obviously, the same problem occurs with years 1964, 1968...
(Review ID: 84408) 
======================================================================

Comments
WORK AROUND Name: vi73552 Date: 06/16/99 Never specify the 29th feb... Or accept a non-lenient parsing ======================================================================
11-06-2004