JavaScript component to return the year, month, and day string.