Add helper method to format date