get totalMillisecondsShift() {
    if (this.timeType !== TimeTypes.distance) {
      return null;
    }

    let totalShift = 0;

    for (let i = 0; i < this.definitions.length; i++) {
      let multiplier = 0;
      switch (this.definitions[i].shiftType) {
        case ShiftTypes.predefined:
          multiplier = 1;
          break;
        case ShiftTypes.years:
          multiplier = 365 * 24 * 60 * 60 * 1000;
          break;
        case ShiftTypes.months:
          multiplier = 30 * 24 * 60 * 60 * 1000;
          break;
        case ShiftTypes.weeks:
          multiplier = 7 * 24 * 60 * 60 * 1000;
          break;
        case ShiftTypes.days:
          multiplier = 24 * 60 * 60 * 1000;
          break;
        case ShiftTypes.hours:
          multiplier = 60 * 60 * 1000;
          break;
        case ShiftTypes.minutes:
          multiplier = 60 * 1000;
          break;
        case ShiftTypes.seconds:
          multiplier = 1000;
          break;
        default:
          break;
      }

      totalShift += this.definitions[i].amount * multiplier;
    }

    return totalShift;
  }
/**
   * Gets of total shift amount in milliseconds for a time distance arg.
   * @return {number} the total shift in milliseconds
   */
Gets of total shift amount in milliseconds for a time distance arg.
@return {number} the total shift in milliseconds
Gets of total shift amount in milliseconds for a time distance arg . @return { number } the total shift in milliseconds
get totalMillisecondsShift() {
    if (this.timeType !== TimeTypes.distance) {
      return null;
    }
    let totalShift = 0;
    for (let i = 0; i < this.definitions.length; i++) {
      let multiplier = 0;
      switch (this.definitions[i].shiftType) {
        case ShiftTypes.predefined:
          multiplier = 1;
          break;
        case ShiftTypes.years:
          multiplier = 365 * 24 * 60 * 60 * 1000;
          break;
        case ShiftTypes.months:
          multiplier = 30 * 24 * 60 * 60 * 1000;
          break;
        case ShiftTypes.weeks:
          multiplier = 7 * 24 * 60 * 60 * 1000;
          break;
        case ShiftTypes.days:
          multiplier = 24 * 60 * 60 * 1000;
          break;
        case ShiftTypes.hours:
          multiplier = 60 * 60 * 1000;
          break;
        case ShiftTypes.minutes:
          multiplier = 60 * 1000;
          break;
        case ShiftTypes.seconds:
          multiplier = 1000;
          break;
        default:
          break;
      }
      totalShift += this.definitions[i].amount * multiplier;
    }
    return totalShift;
  }
get totalMillisecondsShift ( ) { if ( this . timeType !== TimeTypes . distance ) { return null ; } let totalShift = 0 ; for ( let i = 0 ; i < this . definitions . length ; i ++ ) { let multiplier = 0 ; switch ( this . definitions [ i ] . shiftType ) { case ShiftTypes . predefined : multiplier = 1 ; break ; case ShiftTypes . years : multiplier = 365 * 24 * 60 * 60 * 1000 ; break ; case ShiftTypes . months : multiplier = 30 * 24 * 60 * 60 * 1000 ; break ; case ShiftTypes . weeks : multiplier = 7 * 24 * 60 * 60 * 1000 ; break ; case ShiftTypes . days : multiplier = 24 * 60 * 60 * 1000 ; break ; case ShiftTypes . hours : multiplier = 60 * 60 * 1000 ; break ; case ShiftTypes . minutes : multiplier = 60 * 1000 ; break ; case ShiftTypes . seconds : multiplier = 1000 ; break ; default : break ; } totalShift += this . definitions [ i ] . amount * multiplier ; } return totalShift ; }
Gets of total shift amount in milliseconds for a time distance arg.
Gets of total shift amount in milliseconds for a time distance arg .