formatHourRange(startHour, endHour, options) {
    const dayPeriods = this.calendar(options?.locale || this.locale.name).dayPeriods;
    let removePeriod = false;
    let range = `${this.formatHour(startHour, options)} - ${this.formatHour(endHour, options)}`;

    if (range.indexOf(':00 AM -') > -1 || range.indexOf(':00 PM -') > -1) {
      removePeriod = true;
    }

    if (range.split(dayPeriods[0]).length - 1 > 1) {
      range = range.replace(dayPeriods[0], '');
    }

    if (range.split(dayPeriods[1]).length - 1 > 1) {
      range = range.replace(` ${dayPeriods[1]}`, '');
    }

    range = range.replace('  ', ' ');
    if (removePeriod) {
      range = range.replace(':00 -', ' -');
    }
    return range;
  }
/**
   * Formats a number into the locales hour format.
   * @param {number} startHour The hours to show in the current locale.
   * @param {number} endHour The hours to show in the current locale.
   * @param {object} options Additional date formatting settings.
   * @returns {string} the hours in either 24 h or 12 h format
   */
Formats a number into the locales hour format.
@param {number} startHour The hours to show in the current locale.
@param {number} endHour The hours to show in the current locale.
@param {object} options Additional date formatting settings.
@returns {string} the hours in either 24 h or 12 h format
Formats a number into the locales hour format . @param { number } startHour The hours to show in the current locale . @param { number } endHour The hours to show in the current locale . @param { object } options Additional date formatting settings . @returns { string } the hours in either 24 h or 12 h format
formatHourRange(startHour, endHour, options) {
    const dayPeriods = this.calendar(options?.locale || this.locale.name).dayPeriods;
    let removePeriod = false;
    let range = `${this.formatHour(startHour, options)} - ${this.formatHour(endHour, options)}`;
    if (range.indexOf(':00 AM -') > -1 || range.indexOf(':00 PM -') > -1) {
      removePeriod = true;
    }
    if (range.split(dayPeriods[0]).length - 1 > 1) {
      range = range.replace(dayPeriods[0], '');
    }
    if (range.split(dayPeriods[1]).length - 1 > 1) {
      range = range.replace(` ${dayPeriods[1]}`, '');
    }
    range = range.replace('  ', ' ');
    if (removePeriod) {
      range = range.replace(':00 -', ' -');
    }
    return range;
  }
formatHourRange ( startHour , endHour , options ) { const dayPeriods = this . calendar ( options ?. locale || this . locale . name ) . dayPeriods ; let removePeriod = false ; let range = ` ${ this . formatHour ( startHour , options ) } ${ this . formatHour ( endHour , options ) } ` ; if ( range . indexOf ( ':00 AM -' ) > - 1 || range . indexOf ( ':00 PM -' ) > - 1 ) { removePeriod = true ; } if ( range . split ( dayPeriods [ 0 ] ) . length - 1 > 1 ) { range = range . replace ( dayPeriods [ 0 ] , '' ) ; } if ( range . split ( dayPeriods [ 1 ] ) . length - 1 > 1 ) { range = range . replace ( ` ${ dayPeriods [ 1 ] } ` , '' ) ; } range = range . replace ( '  ' , ' ' ) ; if ( removePeriod ) { range = range . replace ( ':00 -' , ' -' ) ; } return range ; }
Formats a number into the locales hour format.
Formats a number into the locales hour format .