Checks if a date falls between (or equals) two other dates.
The date to check
The start date of the range (inclusive)
The end date of the range (inclusive)
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 Copy
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
Checks if a date falls between (or equals) two other dates.