Function yearsSinceDate

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

    Parameters

    • date: number | Date

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

    Returns number

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

    Example

    yearsSinceDate(new Date('2000-01-01'));;
    //=> {number of years since '2000-01-01'}

Generated using TypeDoc