[#BloombergLP-balber-BerUtil_DatetimeImpUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::BerUtil_DatetimeImpUtil :relfileprefix: ../../ :mrdocs: This component‐private `struct` provides a namespace for a suite of functions used by `BerUtil` to implement BER encoding and decoding operations for date and time values. Within the definition of this `struct`: == Synopsis Declared in `<balber_berutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct BerUtil_DatetimeImpUtil; ---- == Description * *the specification*: > Refers to the August 2015 revision of the ITU‐T Recommendation X.690. * *the default set of optionsi*: > Refers to a `balber::BerEncoderOptions` value having a > `datetimeFractionalSecondPrecision` attribute of 3 and a > `encodeDateAndTimeTypesAsBinary` attribute of `false`. See the package level documentation of {`balber`} for a definition of the compact and extended binary formats for date and time values. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/Constants.adoc[`Constants`] | `Constants` is an alias to a namespace for a suite of general‐purpose constants that occur when encoding or decoding BER data. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/DateAndTimeHeader.adoc[`DateAndTimeHeader`] | `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_DatetimeImpUtil/DateAndTimeHeaderUtil.adoc[`DateAndTimeHeaderUtil`] | `DateAndTimeHeaderUtil` is an alias to a namespace for a suite of functions used to implement encoding and decoding operations for the 2‐byte header of an extended‐binary‐encoding formatted date‐and‐time value. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/DateUtil.adoc[`DateUtil`] | `DateUtil` is an alias to a namespace for a suite of functions used to implement BER encoding and decoding operations for date values. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/DatetimeEncoding.adoc[`DatetimeEncoding`] | `DatetimeEncoding` is an alias to a namespace for enumerating the set of formats that may be used by `BerUtil` to encode and decode values of `bdlt::Datetime` type. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/DatetimeOrDatetimeTz.adoc[`DatetimeOrDatetimeTz`] | `DatetimeOrDatetimeTz` is a convenient alias for `bdlb::Variant2<bdlt::Datetime, bdlt::DatetimeTz>`. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/DatetimeOrDatetimeTzEncoding.adoc[`DatetimeOrDatetimeTzEncoding`] | `DatetimeOrDatetimeTzEncoding` is an alias to a namespace for enumerating the set of formats that may be used by `BerUtil` to decode to values of `bdlb::Variant2<bdlt::Datetime, bdlt::DatetimeTz>` type. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/DatetimeTzEncoding.adoc[`DatetimeTzEncoding`] | `DatetimeTzEncoding` is an alias to a namespace for enumerating the set of formats that may be used by `BerUtil` to encode and decode values of `bdlt::DatetimeTz` type. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/ExtendedBinaryEncodingUtil.adoc[`ExtendedBinaryEncodingUtil`] | `DateAndTimeHeaderUtil` is an alias to a namespace for a suite of functions used to implement encoding and decoding operations for the 2‐byte header of an extended‐binary‐encoding formatted date‐and‐time value. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/IntegerUtil.adoc[`IntegerUtil`] | `IntegerUtil` is an alias to a namespace for a suite of functions used to implement BER encoding and decoding operations for integer values. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/Iso8601Util.adoc[`Iso8601Util`] | `Iso8601Util` is an alias to a namespace for a suite of functions used to implementing the encoding and decoding of date and time values using the ISO 8601 format. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/LengthUtil.adoc[`LengthUtil`] | `LengthUtil` is an alias to a namespace for a suite of functions used to implement BER encoding and decoding operations for length quantities. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/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_DatetimeImpUtil/StringUtil.adoc[`StringUtil`] | `StringUtil` is an alias to a namespace for a suite of functions used by `BerUtil` to implement BER encoding and decoding operations for string values. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/TimeUtil.adoc[`TimeUtil`] | `DateUtil` is an alias to a namespace for a suite of functions used to implement BER encoding and decoding operations for time values. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/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. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/getDatetimeOrDatetimeTzValue.adoc[`getDatetimeOrDatetimeTzValue`] | Write a representation of the specified `value` date, time, and optional time zone to the output sequence of the specified `streamBuf` according to the specified `options`. If `options` is 0, the default set of options is used. Return 0 on success, and a non‐zero value otherwise. This operation succeeds if all bytes in the representation of the `value` are written to the output sequence of the `streamBuf` without the write position becoming unavailable. See the class documentation for a description of the default options. See the package‐level documentation of {`balber`} for a description of the decision procedure used to select an encoding format for the `value`. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/getDatetimeTzValue.adoc[`getDatetimeTzValue`] | Read the specified `length` number of bytes from the input sequence of the specified `streamBuf` and load to the specified `value` the date, time, and time zone value represented those bytes. Return 0 on success, and a non‐zero value otherwise. The operation succeeds if `length` bytes are successfully read from the input sequence of the `streamBuf` without the read position becoming unavailable, and the bytes contain a valid representation of a date, time, and time zone value. See the package‐level documentation of {`balber`} for a description of the decision procedure used to detect the encoding format for a `bdlt::Datetime` value. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/getDatetimeValue.adoc[`getDatetimeValue`] | Read the specified `length` number of bytes from the input sequence of the specified `streamBuf` and load to the specified `value` the date and time value represented those bytes. Return 0 on success, and a non‐zero value otherwise. The operation succeeds if `length` bytes are successfully read from the input sequence of the `streamBuf` without the read position becoming unavailable, and the bytes contain a valid representation of a date and time value. See the package‐level documentation of {`balber`} for a description of the decision procedure used to detect the encoding format for a `bdlt::Datetime` value. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/putDatetimeTzValue.adoc[`putDatetimeTzValue`] | Write a representation of the specified `value` date, time, and time zone to the output sequence of the specified `streamBuf` according to the specified `options`. If `options` is 0, the default set of options is used. Return 0 on success, and a non‐zero value otherwise. This operation succeeds if all bytes in the representation of the `value` are written to the output sequence of the `streamBuf` without the write position becoming unavailable. See the class documentation for a description of the default options. See the package‐level documentation of {`balber`} for a description of the decision procedure used to select an encoding format for the `value`. | xref:BloombergLP/balber/BerUtil_DatetimeImpUtil/putDatetimeValue.adoc[`putDatetimeValue`] | Write a representation of the specified `value` date and time to the output sequence of the specified `streamBuf` according to the specified `options`. If `options` is 0, the default set of options is used. Return 0 on success, and a non‐zero value otherwise. This operation succeeds if all bytes in the representation of the `value` are written to the output sequence of the `streamBuf` without the write position becoming unavailable. See the class documentation for a description of the default options. See the package‐level documentation of {`balber`} for a description of the decision procedure used to select an encoding format for the `value`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#