Revised the getDate() method