Luxon Home Reference Source Repository
import {Zone} from 'luxon/src/zone.js'
public interface | source

Zone

Direct Subclass:

src/zones/fixedOffsetZone.js~FixedOffsetZone, src/zones/IANAZone.js~IANAZone, src/zones/localZone.js~LocalZone

Static Method Summary

Static Public Methods
public static abstract

offsetName(ts: number, options: Object): string

Returns the offset's common name (such as EST) at the specified timestamp

Member Summary

Public Members
public get abstract

Return whether this Zone is valid.

public get abstract

The name of this zone.

public get abstract

The type of zone

public get abstract

Returns whether the offset is known to be fixed for the whole year.

Method Summary

Public Methods
public abstract

equals(otherZone: Zone): boolean

Return whether this Zone is equal to another zoner

public abstract

Return the offset in minutes for this zone at the specified timestamp.

Static Public Methods

public static abstract offsetName(ts: number, options: Object): string source

Returns the offset's common name (such as EST) at the specified timestamp

Params:

NameTypeAttributeDescription
ts number

Epoch milliseconds for which to get the name

options Object

Options to affect the format

options.format string

What style of offset to return. Accepts 'long' or 'short'.

options.localeCode string

What locale to return the offset name in. Defaults to us-en

Return:

string

Public Members

public get abstract isValid: boolean source

Return whether this Zone is valid.

Return:

boolean

public get abstract name: string source

The name of this zone.

Return:

string

public get abstract type: string source

The type of zone

Return:

string

public get abstract universal: boolean source

Returns whether the offset is known to be fixed for the whole year.

Return:

boolean

Public Methods

public abstract equals(otherZone: Zone): boolean source

Return whether this Zone is equal to another zoner

Params:

NameTypeAttributeDescription
otherZone Zone

the zone to compare

Return:

boolean

public abstract offset(ts: number): number source

Return the offset in minutes for this zone at the specified timestamp.

Params:

NameTypeAttributeDescription
ts number

Epoch milliseconds for which to compute the offset

Return:

number