@mindfulness/utils
    Preparing search index...

    Function differenceInMinutes

    • Parameters

      • dateLeft: string | number | Date

        The later date

      • dateRight: string | number | Date

        The earlier date

      • Optionaloptions: DifferenceInMinutesOptions

        An object with options.

      Returns number

      The number of minutes

      differenceInMinutes

      Get the signed number of full (rounded towards 0) minutes between the given dates.

      // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?
      const result = differenceInMinutes(
      new Date(2014, 6, 2, 12, 20, 0),
      new Date(2014, 6, 2, 12, 7, 59)
      )
      //=> 12
      // How many minutes are between 10:01:59 and 10:00:00
      const result = differenceInMinutes(
      new Date(2000, 0, 1, 10, 0, 0),
      new Date(2000, 0, 1, 10, 1, 59)
      )
      //=> -1