Function monthsSinceDate

  • Calculates the number of months that have passed since the provided date.

    Parameters

    • date: number | Date

      The date from which to calculate the number of passed months.

    Returns number

    The number of months that have passed since the provided date.

    Example

    new Date(2020, 0, 1);;
    //=> {date}
    monthsSinceDate(new Date(2020, 0, 1));;
    //=> {number of months since January 1, 2020}

Generated using TypeDoc