Use separate functions to format date.