This component‐private, in‐core, value‐semantic attribute class provides a representation of the information available in the first two bytes of any extended‐binary‐encoding formatted data. All extended‐binary encoding schemes for date‐and‐time types contain a 2‐byte header in the same format, which can be unambiguously distinguished from the first 2 bytes of a date‐and‐time type in its corresponding compact‐binary‐encoding format or its ISO 8601 format.

Synopsis

Declared in <balber_berutil.h>

class BerUtil_DateAndTimeHeader;

Type Aliases

Name

Description

TimezoneUtil

TimezoneUtil is an alias to a namespace for a suite of functions used to implement BER encoding and decoding operations for time‐zone offset values.

Type

Type is an alias to a namespace for enumerating the set of "header type" values that may be encoded in the 2‐byte header of an extended‐binary‐encoding formatted date‐and‐time value.

Member Functions

Name

Description

BerUtil_DateAndTimeHeader [constructor]

Create a BerUtil_DateAndTimeHeader object having a type attribute with the Type::e_NOT_EXTENDED_BINARY value and a timezoneOffsetInMinutes attribute with the 0 value.

isExtendedBinary

Return true if the type attribute of this object is Type::e_EXTENDED_BINARY_WITH_TIMEZONE or Type::e_EXTENDED_BINARY_WITHOUT_TIMEZONE, and false otherwise.

isExtendedBinaryWithTimezone

Return true if the type attribute of this object is Type::e_EXTENDED_BINARY_WITH_TIMEZONE, and false otherwise.

isExtendedBinaryWithoutTimezone

Return true if the type attribute of this object is Type::e_EXTENDED_BINARY_WITHOUT_TIMEZONE, and false otherwise.

makeExtendedBinaryWithTimezone

Set the type attribute of this object to the Type::e_EXTENDED_BINARY_WITH_TIMEZONE value and the timezoneOffsetInMinutes attribute of this object to the specified offset. The behavior is undefined unless TimezoneUtil::k_MIN_OFFSET <= offset and TimezoneUtil::k_MAX_OFFSET >= offset.

makeExtendedBinaryWithoutTimezone

Set the type attribute of this object to the Type::e_EXTENDED_BINARY_WITHOUT_TIMEZONE value and the timezoneOffsetInMinutes attribute of this object to the 0 value.

makeNotExtendedBinary

Set the type attribute of this object to the Type::e_NOT_EXTENDED_BINARY value and the timezoneOffsetInMinutes attribute of this object to the 0 value.

timezoneOffsetInMinutes

Return the value of the timezoneOffsetInMinutes attribute of this object.

Created with MrDocs