BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlt_datetimeimputil

Detailed Description

Outline

Purpose

Provide constants useful for encoding datetimes.

Classes

Description

This component implements a utility struct, bdlt::DatetimeImpUtil, that defines a namespace for obtaining constants and bdlt::Datetime * to constant values that are useful to encoding datetimes at static-initilaization time. The assumptions for this encoding are that a collection of unset values, one per day over the valid range of bdlt::Date, are encoded in the lowest values, and then microsecond resolution over the entire bdlt::Date range.

Usage

This section illustrates intended use of this component.

Example 1: Basic Syntax

To obtain the bdlt::Datetime internal value for 0001/01/01 at static-initialization time:

static const bdlt::Datetime *firstDatetime =
assert(reinterpret_cast<const bdlt::Datetime *>(
Definition bdlt_datetime.h:331
static const Datetime * epoch_0001_01_01()
static const bsls::Types::Uint64 k_0001_01_01_VALUE
Definition bdlt_datetimeimputil.h:94