Package: effect
Module: DateTime
Checks effectfully if a DateTime is in the past compared to the current time.
Details
This is an effectful operation that uses the current time from the Clock service.
Example (Checking past DateTime values effectfully)
import { DateTime, Effect } from "effect"
const program = Effect.gen(function*() {
const pastDate = DateTime.subtract(yield* DateTime.now, { hours: 1 })
const isPast = yield* DateTime.isPast(pastDate)
console.log(isPast) // true
})
Signature
declare const isPast: (self: DateTime) => Effect.Effect<boolean>
Since v3.6.0