improvements to date_range_string function to allow for formatting