@tremendous/help
    Preparing search index...

    Function isDateBetween

    • Checks if a date falls between (or equals) two other dates.

      Type Parameters

      • T extends Date

      Parameters

      • date: T

        The date to check

      • startDate: T

        The start date of the range (inclusive)

      • endDate: T

        The end date of the range (inclusive)

      Returns boolean

      • True if the date is between or equal to startDate and endDate
      const date = new Date('2024-03-15');
      const start = new Date('2024-03-01');
      const end = new Date('2024-03-31');
      isDateBetween(date, start, end); // true