tryParseDayDefinition(text) {
    // False positive of ESLint: Number.isNaN cannot recognize arbitrary text (e.g. "test") as NaN. So use direct isNaN.
    /* eslint-disable unicorn/prefer-number-properties */
    if (
      isNaN(text) ||
      Number.parseInt(text, 10) < RecurrenceShifts.days.minValue ||
      Number.parseInt(text, 10) > RecurrenceShifts.days.maxValue
    ) {
      return null;
    }
    /* eslint-enable unicorn/prefer-number-properties */

    return [{ amount: Number.parseInt(text, 10), shiftType: ShiftTypes.days }];
  }
/**
   * Tries to parse a day of 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 day of 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 day of 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
tryParseDayDefinition(text) {
    if (
      isNaN(text) ||
      Number.parseInt(text, 10) < RecurrenceShifts.days.minValue ||
      Number.parseInt(text, 10) > RecurrenceShifts.days.maxValue
    ) {
      return null;
    }
    return [{ amount: Number.parseInt(text, 10), shiftType: ShiftTypes.days }];
  }
tryParseDayDefinition ( text ) { if ( isNaN ( text ) || Number . parseInt ( text , 10 ) < RecurrenceShifts . days . minValue || Number . parseInt ( text , 10 ) > RecurrenceShifts . days . maxValue ) { return null ; } return [ { amount : Number . parseInt ( text , 10 ) , shiftType : ShiftTypes . days } ] ; }
Tries to parse a day of month definition from text.
Tries to parse a day of month definition from text .
// False positive of ESLint: Number.isNaN cannot recognize arbitrary text (e.g. "test") as NaN. So use direct isNaN. /* eslint-disable unicorn/prefer-number-properties */ /* eslint-enable unicorn/prefer-number-properties */