adding util method to format dates