effect-io-ai

Package: effect
Module: DateTime

DateTime.now

Gets the current time using the Clock service and convert it to a DateTime.

Example (Getting the current DateTime)

import { DateTime, Effect } from "effect"

Effect.gen(function*() {
  const now = yield* DateTime.nowAsDate
  console.log(now instanceof Date) // true
})

Signature

declare const now: Effect.Effect<Utc, never, never>

Source

Since v3.6.0