Temporal Utils by Ian Macalinao
    Preparing search index...

    Function startOfQuarter

    • Type Parameters

      Parameters

      • date: T

        The original date

      Returns T

      The start of a quarter

      startOfQuarter

      Return the start of a year quarter for the given date. The result will be in the local timezone.

      // The start of a quarter for 2 September 2014 11:55:00:
      const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))
      //=> Tue Jul 01 2014 00:00:00