java - SimpleDateFormat does not throw IllegalArgumentException -
I want to check the date pattern like this:
try {new SimpleDateFormat (Pattern)} hold (illegal illegal exception e) {} But it seems that when I try to add "AAA", then it does not fail: (
This is because I Try to add "aaa", code> AM / PM marker. a
SimpleDateform F = New SimpleDateform ("AAA"); System. Autkprintelan (Fkformet (new Date ()); // prints "AM"
Comments
Post a Comment