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

    return null;
  }
/**
   * Tries to parse a month 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 month 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 month 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
tryParseMonthDefinition(text) {
    const monthKeys = Object.keys(MonthNames);
    for (const [i, element] of monthKeys.entries()) {
      if (
        text.localeCompare(this.langManager.getString(MonthNames[element].short), undefined, {
          sensitivity: 'accent'
        }) === 0 ||
        text.localeCompare(this.langManager.getString(MonthNames[element].full), undefined, {
          sensitivity: 'accent'
        }) === 0
      ) {
        return [{ amount: i, shiftType: ShiftTypes.months }];
      }
    }
    return null;
  }
tryParseMonthDefinition ( text ) { const monthKeys = Object . keys ( MonthNames ) ; for ( const [ i , element ] of monthKeys . entries ( ) ) { if ( text . localeCompare ( this . langManager . getString ( MonthNames [ element ] . short ) , undefined , { sensitivity : 'accent' } ) === 0 || text . localeCompare ( this . langManager . getString ( MonthNames [ element ] . full ) , undefined , { sensitivity : 'accent' } ) === 0 ) { return [ { amount : i , shiftType : ShiftTypes . months } ] ; } } return null ; }
Tries to parse a month definition from text.
Tries to parse a month definition from text .