This could use a better name.  This function formats a timedelta.