Function msSinceDate

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

    Parameters

    • date: number | Date

      The date from which to calculate the elapsed time.

    Returns number

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

    Throws

    If the provided date is not a Date object or an integer.

    Example

    msSinceDate(new Date('2020-01-01'));;
    //=> {number of milliseconds since 2020-01-01}

Generated using TypeDoc