moved some logic around formatting the dates to datetimeservice