function getEndDate(rangeBar) {
  return parseDate(Array.isArray(rangeBar) ? rangeBar[2] : rangeBar.endDate);
}
Get the end date of the provided range bar.

@param {Object} rangeBar The range bar object.
@returns {Date} The end date.