fixing getDate