Name: tb29552 Date: 06/25/97
SimpleDateFormat("dd/MM/yyyy").parse(...) accepts invalid
input strings (e.g. "35/01/1971") without raising an exception.
Sample program:
import java.text.*;
import java.util.*;
public class DateFormatBug {
public static void main(String [] args) {
try {
System.out.println(new SimpleDateFormat("dd/MM/yyyy").parse("35/01/1971").toString());
} catch (ParseException e) {
System.out.println("Exception: " + e);
}
}
}
Console output:
Thu Feb 04 03:00:00 EST 1971
company - Footprint Software Inc. , email - ###@###.###
======================================================================