Function hoursSinceDate

  • Calculates the number of hours that have passed since the given date.

    Parameters

    • date: number | Date

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

    Returns number

    The number of hours that have passed since the given date.

    Example

    new Date('2020-01-01T00:00:00Z');;
    //=> {date object}
    hoursSinceDate(new Date('2020-01-01T00:00:00Z'));;
    //=> {number of hours since January 1, 2020}

Generated using TypeDoc