Creating own helper method for formatting date