[#BloombergLP-balber-BerUtil_DateAndTimeHeaderImpUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::BerUtil_DateAndTimeHeaderImpUtil :relfileprefix: ../../ :mrdocs: This component‐private utility `struct` provides a namespace for a suite of functions used by `BerUtil` to implement encoding and decoding operations for the 2‐byte header of extended‐binary‐encoding formatted date‐and‐time value. == Synopsis Declared in `<balber_berutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct BerUtil_DateAndTimeHeaderImpUtil; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/Header.adoc[`Header`] | `Header` is an alias to an in‐core, value‐semantic attribute class that represents the range of valid values of the 2‐byte header of extended‐binary‐encoding formatted date‐and‐time values. | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/StreambufUtil.adoc[`StreambufUtil`] | `StreambufUtil` is an alias to a namespace for a suite of functions used to implement input and output operations on `bsl::streambuf` objects. | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/TimezoneUtil.adoc[`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. | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/Type.adoc[`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. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/detectType.adoc[`detectType`] | If the specified `firstByte` of an encoded date‐and‐time value indicates it is in a compact‐binary‐encoding format or an ISO 8601 format, load the value `Type::e_NOT_EXTENDED_BINARY` to the specified `type`. If it indicates it is in an extended‐binary format that carries a time‐zone offset value, load the value `Type::e_EXTENDED_BINARY_WITH_TIMEZONE` to the `type`. If it indicates it is in an extended‐binary format that does not carry a time‐zone offset value, load the value `Type::e_EXTENDED_BINARY_WITHOUT_TIMEZONE` to the `type`. The behavior is undefined unless `isReserved(firstByte)` returns `false`. | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/detectTypeIfNotReserved.adoc[`detectTypeIfNotReserved`] | If the specified `firstByte` of an encoded date‐and‐time value indicates it is in a compact‐binary‐encoding format or an ISO 8601 format, load the value `Type::e_NOT_EXTENDED_BINARY` to the specified `type` and `false` to the specified `reserved` flag. If it indicates it is in an extended‐binary format that carries a time‐zone offset value, load the value `Type::e_EXTENDED_BINARY_WITH_TIMEZONE` to the `type` and `false` to `reserved`. If it indicates it is in an extended‐binary format that does not carry a time‐zone offset value, load the value `Type::e_EXTENDED_BINARY_WITHOUT_TIMEZONE` to the `type` and `false` to `reserved`. Otherwise, load the value `true` to `reserved` and leave the `type` in a valid but unspecified state. Note that this operation has a wide contract because all possible values of `firstByte` can be interpreted to indicate one of the conditions described above. | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/getValue-0d.adoc[`getValue`] | `getValue` overloads | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/getValueIfNotReserved-09.adoc[`getValueIfNotReserved`] | `getValueIfNotReserved` overloads | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/isExtendedBinary.adoc[`isExtendedBinary`] | Return `true` if the specified `firstByte` of an encoded date‐and‐time value indicates it is in the extended‐binary‐encoding format, and return `false` otherwise. | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/isExtendedBinaryWithTimezone.adoc[`isExtendedBinaryWithTimezone`] | Return `true` if the specified `firstByte` if an encoded date‐and‐time value indicates is is in the extended‐binary‐encoding format and carries a time‐zone offset value, and return `false` otherwise. | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/isExtendedBinaryWithoutTimezone.adoc[`isExtendedBinaryWithoutTimezone`] | Return `true` if the specified `firstByte` of an encoded date‐and‐time value indicates it is in the extended‐binary‐encoding format and does not carry a time‐zone offset value, and return `false` otherwise. | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/isReserved.adoc[`isReserved`] | Return `true` if the specified `firstByte` of an encoded date‐and‐time value indicates it is in a format reserved for future use, and return `false` otherwise. Note that this may indicate the value was encoded incorrectly or using a newer version of this component. | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/putExtendedBinaryWithTimezoneValue.adoc[`putExtendedBinaryWithTimezoneValue`] | Write a representation of an extended‐binary header value that carries the specified `timezoneOffsetInMinutes` time‐zone offset value to the specified `streamBuf`. Return 0 on success, and a non‐zero value otherwise. | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/putExtendedBinaryWithoutTimezoneValue.adoc[`putExtendedBinaryWithoutTimezoneValue`] | Write a representation of an extended‐binary header value that does not carry a time‐zone offset value to the specified `streamBuf`. Return 0 on success, and a non‐zero value otherwise. |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balber/BerUtil_DateAndTimeHeaderImpUtil/k_HEADER_LENGTH.adoc[`k_HEADER_LENGTH`] | Number of octets used to encode an extended‐binary‐encoding header. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#