[#BloombergLP-balber-BerUtil_DateImpUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::BerUtil_DateImpUtil :relfileprefix: ../../ :mrdocs: Utilities for BER date encoding and decoding. == Synopsis Declared in `<balber_berutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct BerUtil_DateImpUtil; ---- == Description This component‐private `struct` provides a namespace for a suite of functions used by `BerUtil` to implement BER encoding and decoding operations for date values. Within the definition of this `struct`: * *the specification*: > Refers to the August 2015 revision of the ITU‐T Recommendation X.690. * *the default set of options*: > 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_DateImpUtil/DateAndTimeHeaderUtil.adoc[`DateAndTimeHeaderUtil`] | Alias for extended‐binary date‐and‐time header utilities. | xref:BloombergLP/balber/BerUtil_DateImpUtil/DateEncoding.adoc[`DateEncoding`] | `DateEncoding` 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::Date` type. | xref:BloombergLP/balber/BerUtil_DateImpUtil/DateOrDateTz.adoc[`DateOrDateTz`] | `DateOrDateTz` is a convenient alias for `bdlb::Variant2<bdlt::Date, bdlt::DateTz>`. | xref:BloombergLP/balber/BerUtil_DateImpUtil/DateOrDateTzEncoding.adoc[`DateOrDateTzEncoding`] | Alias for date‐or‐date‐tz encoding format enumerations. | xref:BloombergLP/balber/BerUtil_DateImpUtil/DateTzEncoding.adoc[`DateTzEncoding`] | `DateEncoding` 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::DateTz` type. | xref:BloombergLP/balber/BerUtil_DateImpUtil/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_DateImpUtil/Iso8601Util.adoc[`Iso8601Util`] | Alias for ISO 8601 date and time encoding utilities. | xref:BloombergLP/balber/BerUtil_DateImpUtil/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_DateImpUtil/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_DateImpUtil/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_DateImpUtil/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. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balber/BerUtil_DateImpUtil/_04enum.adoc[`Unnamed enum`] | Epoch constants for compact‐binary date encoding. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balber/BerUtil_DateImpUtil/dateToDaysSinceEpoch.adoc[`dateToDaysSinceEpoch`] | Convert a date to days relative to the compact‐binary date epoch. | xref:BloombergLP/balber/BerUtil_DateImpUtil/daysSinceEpochToDate.adoc[`daysSinceEpochToDate`] | Load to the specified `date` the date represented by the serial date indicated by adding the specified `daysSinceEpoch` to `k_COMPACT_BINARY_DATE_EPOCH`. | xref:BloombergLP/balber/BerUtil_DateImpUtil/getDateOrDateTzValue.adoc[`getDateOrDateTzValue`] | Read the specified `length` number of bytes from the input sequence of the specified `streamBuf` and load to the specified `value` the date and optional time. | xref:BloombergLP/balber/BerUtil_DateImpUtil/getDateTzValue.adoc[`getDateTzValue`] | Decode a `bdlt::DateTz` value from `streamBuf`. | xref:BloombergLP/balber/BerUtil_DateImpUtil/getDateValue.adoc[`getDateValue`] | Decode a `bdlt::Date` value from `streamBuf`. | xref:BloombergLP/balber/BerUtil_DateImpUtil/putDateTzValue.adoc[`putDateTzValue`] | Encode a `bdlt::DateTz` value to `streamBuf`. | xref:BloombergLP/balber/BerUtil_DateImpUtil/putDateValue.adoc[`putDateValue`] | Encode a `bdlt::Date` value to `streamBuf`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#