effect-io-ai

Package: effect
Module: DateTime

DateTime.format

Format a DateTime as a string using the DateTimeFormat API.

The timeZone option is set to the offset of the time zone.

Note: On Node versions < 22, fixed “Offset” zones will set the time zone to “UTC” and use the adjusted Date.

Signature

declare const format: { (options?: (Intl.DateTimeFormatOptions & { readonly locale?: Intl.LocalesArgument; }) | undefined): (self: DateTime) => string; (self: DateTime, options?: (Intl.DateTimeFormatOptions & { readonly locale?: Intl.LocalesArgument; }) | undefined): string; }

Source

Since v3.6.0