getCurrentDate function implementation