Class UtcOffset

This class represents the "utc-offset" value type, with various calculation and manipulation methods.

Hierarchy

  • UtcOffset

Constructors

  • Creates a new ICAL.UtcOffset instance.

    Parameters

    • Optional aData: UtcOffsetData

      An object with members of the utc offset

    Returns UtcOffset

Properties

factor: number = 1

The sign of the utc offset, 1 for positive offset, -1 for negative offsets.

hours: number = 0

The hours in the utc-offset

icaltype: "utc-offset" = 'utc-offset'

The type name, to be used in the jCal object.

minutes: number = 0

The minutes in the utc-offset

Methods

  • Compare this utc offset with another one.

    Parameters

    • other: UtcOffset

      The other offset to compare with

    Returns number

    -1, 0 or 1 for less/equal/greater

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

    Parameters

    • Optional aData: UtcOffsetData

      An object with members of the utc offset

    Returns void

  • Sets up the current instance from the given seconds value. The seconds value is truncated to the minute. Offsets are wrapped when the world ends, the hour after UTC+14:00 is UTC-12:00.

    Parameters

    • aSeconds: number

      The seconds to convert into an offset

    Returns UtcOffset

  • The iCalendar string representation of this utc-offset.

    Returns string

  • Convert the current offset to a value in seconds

    Returns number

    The offset in seconds

  • The string representation of this utc-offset.

    Returns string

  • Creates a new ICAL.UtcOffset instance from the passed seconds value.

    Parameters

    • aSeconds: number

      The number of seconds to convert

    Returns UtcOffset

  • Creates a new ICAL.UtcOffset instance from the passed string.

    Parameters

    • aString: string

      The string to parse

    Returns UtcOffset

    The created utc-offset instance

Generated using TypeDoc