kaven-basic - v6.0.0
    Preparing search index...

    Function DateDiff

    • Calculates the difference between two dates in the specified time unit.

      Parameters

      • date: Date

        The first date to compare.

      • anotherDate: Date

        The second date to compare.

      • unit: "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks" = "milliseconds"

        The unit of time to return the difference in (defaults to "milliseconds").

      Returns number

      The difference between the two dates in the specified unit.

      4.0.0

      2021-12-14