• Returns the number of years since date, rounded down

    Parameters

    • date: Date

    Returns number

    const today = new Date();
    const date = new Date(today.setMonth(today.getMonth() - 18));
    yearsPassed(date); // 1