effect-io-ai

Package: effect
Module: DateTime

DateTime.nowAsDate

Gets the current time from the Clock service and returns it as a JavaScript Date.

Example (Getting the current Date)

import { DateTime, Effect } from "effect"

Effect.gen(function*() {
  const now = yield* DateTime.now
})

Signature

declare const nowAsDate: Effect.Effect<Date, never, never>

Source

Since v3.14.0