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 a

I Try to add "aaa", code> AM / PM marker.

  SimpleDateform F = New SimpleDateform ("AAA"); System. Autkprintelan (Fkformet (new Date ()); // prints "AM"  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -