@mindfulness/utils
    Preparing search index...

    Function differenceInSeconds

    • Parameters

      • laterDate: string | number | Date

        The later date

      • earlierDate: string | number | Date

        The earlier date

      • Optionaloptions: DifferenceInSecondsOptions

        An object with options.

      Returns number

      The number of seconds

      differenceInSeconds

      Get the number of seconds between the given dates.

      // How many seconds are between
      // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?
      const result = differenceInSeconds(
      new Date(2014, 6, 2, 12, 30, 20, 0),
      new Date(2014, 6, 2, 12, 30, 7, 999)
      )
      //=> 12