@mindfulness/utils
    Preparing search index...

    Function setMinutes

    • Type Parameters

      • DateType extends Date

        The Date type, the function operates on. Gets inferred from passed arguments. Allows using extensions like UTCDate.

      • ResultDate extends Date = DateType

        The result Date type, returned from the context function, or inferred from the arguments.

      Parameters

      • date: DateArg<DateType>

        The date to be changed

      • minutes: number

        The minutes of the new date

      • Optionaloptions: SetMinutesOptions<ResultDate>

        An object with options

      Returns ResultDate

      The new date with the minutes set

      setMinutes

      Set the minutes to the given date.

      // Set 45 minutes to 1 September 2014 11:30:40:
      const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)
      //=> Mon Sep 01 2014 11:45:40