Given the input `Jan 1, 2000 12:00 PM`, and the fo...
# random
d
Given the input
Jan 1, 2000 12:00 PM
, and the formats
MMM d, y h:mm a
&
MMM d, y HH:mm
, my question is: why do both formats match the input using
SimpleDateFormat
?
stackoverflow 2
n
Because the
SimpleDateFormat
parser ignores "extra stuff" at the end. Change "PM" to "AM" and you will get 2 different timestamps. BTW: you should really use
FastDateFormat