SimpleDateFormat is a very kind parser that rolls the resulting date instead of throwing an error. How can I parse a date strictly without regexps etc?
fmt = new SimpleDateFormat("dd.MM.yyyy")
fmt.parse("10.11.2012") // it works
fmt.parse("10.1150.2012") // it works but it's unwanted
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…