tryParseDayOfWeekDefinition(text) {
    const dayOfWeekKeys = Object.keys(DayOfWeekNames);
    for (const [i, element] of dayOfWeekKeys.entries()) {
      if (
        text.localeCompare(this.langManager.getString(DayOfWeekNames[element].short), undefined, {
          sensitivity: 'accent'
        }) === 0 ||
        text.localeCompare(this.langManager.getString(DayOfWeekNames[element].full), undefined, {
          sensitivity: 'accent'
        }) === 0
      ) {
        return [{ amount: i, shiftType: ShiftTypes.dayofweek }];
      }
    }

    return null;
  }
/**
   * Tries to parse a day of week definition from text.
   * @param  {string}          text the text to parse
   * @return {(Array | null)}       array of objects containing the shift type and amount, or null if unsuccessful
   */
Tries to parse a day of week definition from text.
@param  {string}          text the text to parse
@return {(Array | null)}       array of objects containing the shift type and amount, or null if unsuccessful
Tries to parse a day of week definition from text . @param { string } text the text to parse @return { ( Array | null ) } array of objects containing the shift type and amount or null if unsuccessful
tryParseDayOfWeekDefinition(text) {
    const dayOfWeekKeys = Object.keys(DayOfWeekNames);
    for (const [i, element] of dayOfWeekKeys.entries()) {
      if (
        text.localeCompare(this.langManager.getString(DayOfWeekNames[element].short), undefined, {
          sensitivity: 'accent'
        }) === 0 ||
        text.localeCompare(this.langManager.getString(DayOfWeekNames[element].full), undefined, {
          sensitivity: 'accent'
        }) === 0
      ) {
        return [{ amount: i, shiftType: ShiftTypes.dayofweek }];
      }
    }
    return null;
  }
tryParseDayOfWeekDefinition ( text ) { const dayOfWeekKeys = Object . keys ( DayOfWeekNames ) ; for ( const [ i , element ] of dayOfWeekKeys . entries ( ) ) { if ( text . localeCompare ( this . langManager . getString ( DayOfWeekNames [ element ] . short ) , undefined , { sensitivity : 'accent' } ) === 0 || text . localeCompare ( this . langManager . getString ( DayOfWeekNames [ element ] . full ) , undefined , { sensitivity : 'accent' } ) === 0 ) { return [ { amount : i , shiftType : ShiftTypes . dayofweek } ] ; } } return null ; }
Tries to parse a day of week definition from text.
Tries to parse a day of week definition from text .