Hyperlinkv0.8.0-beta.28

DateTime

DateTime.nowAsDateconsteffect/DateTime.ts:857
Effect.Effect<Date, never, never>

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
})
constructors
export const nowAsDate: Effect.Effect<Date> = Internal.nowAsDate