fix getDate() method