Package: effect
Module: DateTime
Checks whether a DateTime is between two other DateTime values (inclusive).
Example (Checking whether a DateTime is within bounds)
import { DateTime } from "effect"
const min = DateTime.makeUnsafe("2024-01-01")
const max = DateTime.makeUnsafe("2024-12-31")
const date = DateTime.makeUnsafe("2024-06-15")
console.log(DateTime.between(date, { minimum: min, maximum: max })) // true
Signature
declare const between: { (options: { minimum: DateTime; maximum: DateTime; }): (self: DateTime) => boolean; (self: DateTime, options: { minimum: DateTime; maximum: DateTime; }): boolean; }
Since v3.6.0