Class Timezone

Timezone representation.

Example

var vcalendar;
var timezoneComp = vcalendar.getFirstSubcomponent('vtimezone');
var tzid = timezoneComp.getFirstPropertyValue('tzid');

var timezone = new ICAL.Timezone({
component: timezoneComp,
tzid
});

Alias

ICAL.Timezone

Hierarchy

  • Timezone

Constructors

  • Creates a new ICAL.Timezone instance, by passing in a tzid and component.

    Parameters

    • Optional data: Component | TimezoneData

      options for class

    Returns Timezone

Properties

changes: Change[]
component: null | Component = null

The vtimezone component for this timezone.

expandedUntilYear: number = 0

The year this timezone has been expanded to. All timezone transition dates until this year are known and can be used for calculation

icalclass: "icaltimezone" = 'icaltimezone'

The class identifier.

latitude: number = 0.0

The primary latitude for the timezone.

location: string = ''

Timezone location

longitude: number = 0.0

The primary longitude for the timezone.

tzid: string = ''

Timezone identifier

tznames: string = ''

Alternative timezone name, for the string representation

wrappedJSObject: Timezone
#localTimezone: Timezone

The instance describing the local timezone

#utcTimezone: Timezone

The instance describing the UTC timezone

EXTRA_COVERAGE: number = 5
_minimumExpansionYear: number = -1

Accessors

Methods

  • Parameters

    • aYear: number

    Returns void

  • Parameters

    • aComponent: any
    • aYear: any
    • changes: Change[]

    Returns null | Change[]

  • Parameters

    • change: Change

    Returns number

  • Sets up the current instance using members from the passed data object.

    Parameters

    • Optional aData: Component | TimezoneData

      options for class

    Returns Timezone

  • The string representation of this timezone.

    Returns string

  • Finds the utcOffset the given time would occur in this timezone.

    Parameters

    • tt: Time

      The time to check for

    Returns number

    utc offset in seconds

  • Parameters

    • a: Change
    • b: Change

    Returns 0 | 1 | -1

  • Private

    Adjust a timezone change object.

    Parameters

    • change: Required<TimeData>

      The timezone change object

    • days: number

      The extra amount of days

    • hours: number

      The extra amount of hours

    • minutes: number

      The extra amount of minutes

    • seconds: number

      The extra amount of seconds

    Returns Time

  • Convert the date/time from one zone to the next.

    Parameters

    • tt: Time

      The time to convert

    • fromZone: Timezone

      The source zone to convert from

    • toZone: Timezone

      The target zone to convert to

    Returns null | Time

    The converted date/time object

Generated using TypeDoc