getDate() function added