Hyperlinkv0.8.0-beta.28

DateTime

DateTime.nowconsteffect/DateTime.ts:838
Effect.Effect<Utc, never, never>

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
})
constructors
export const now: Effect.Effect<Utc> = Internal.now
Referenced by 1 symbols