The getDate() method returns an array that it creates and fills using data from the a array.

Read the API doc for the getDate() method to see what it is supposed to do.