Function getDiffInHrs

  • Calculates the difference in hours between two provided dates.

    Parameters

    • from: Date

      The starting date.

    • to: Date

      The ending date.

    Returns number

    The difference in hours between the two dates.

    Example

    console.log(getDiffInHrs(new Date("12/12/2012"), new Date()));
    

Generated using TypeDoc