ChronosChronos

isBetween

Checks if a date falls within a specified date range (inclusive or exclusive).

isBetween()

Checks if a date falls within a specified date range (inclusive or exclusive).

Signature

isBetween(start: ChronosInput, end: ChronosInput, inclusive?: '[]' | '[)' | '(]' | '()'): boolean

Parameters

  • start: Start of date range
  • end: End of date range
  • inclusive: (Optional) Range boundary inclusion:
    • []: Include both start and end
    • [) Include start, exclude end
    • (]: Exclude start, include end
    • (): Exclude both boundaries (default)

Return Type

boolean - Returns true if the date falls within the specified range

Example

playground.ts

Last updated: Wed, Jun 24, 2026 09:04:13AM (UTC)

On this page