Hyperlinkv0.8.0-beta.28

DateTime

DateTime.TimeZonetypeeffect/DateTime.ts:277
TimeZone

Represents a time zone used by DateTime.Zoned.

Details

A TimeZone is either a fixed offset from UTC or a named IANA time zone.

models
Source effect/DateTime.ts:27757 lines
export type TimeZone = TimeZone.Offset | TimeZone.Named

/**
 * Companion namespace containing the public variant and protocol types for
 * `TimeZone`.
 *
 * @since 3.6.0
 */
export declare namespace TimeZone {
  /**
   * Shared protocol implemented by all `TimeZone` values.
   *
   * **Details**
   *
   * Provides the `TimeZone` type identifier and inspection support.
   *
   * @category models
   * @since 3.6.0
   */
  export interface Proto extends Inspectable {
    readonly [TimeZoneTypeId]: typeof TimeZoneTypeId
  }

  /**
   * Fixed-offset time zone.
   *
   * **Details**
   *
   * The `offset` is measured in milliseconds from UTC. Positive offsets are
   * ahead of UTC, and negative offsets are behind UTC.
   *
   * @category models
   * @since 3.6.0
   */
  export interface Offset extends Proto {
    readonly _tag: "Offset"
    readonly offset: number
  }

  /**
   * Named IANA time zone.
   *
   * **Details**
   *
   * The `id` field contains the resolved time zone identifier, such as
   * `"Europe/London"` or `"America/New_York"`.
   *
   * @category models
   * @since 3.6.0
   */
  export interface Named extends Proto {
    readonly _tag: "Named"
    readonly id: string
    /** @internal */
    readonly format: Intl.DateTimeFormat
  }
}
Referenced by 29 symbols