Adds or subtracts a specified number of months from a given date.

  • Parameters

    • date: Date

      Date to provide

    • monthsToAddOrSubtract: number

      Amount of months to add or subtract. Ex: -1 for the previous month, 1 for the next month.

    Returns Date