testing alternative code for getDate function - success!