BloombergLP::balber::BerUtil_DateImpUtil::dateToDaysSinceEpoch

Convert a date to days relative to the compact-binary date epoch.

Synopsis

Declared in <balber_berutil.h>

static
void
dateToDaysSinceEpoch(
    bsls::Types::Int64* daysSinceEpoch,
    bdlt::Date const& date);

Description

Load to the specified daysSinceEpoch the number of days between the compact-binary date epoch and the specified date. The compact-binary date epoch is the date defined by the k_COMPACT_BINARY_DATE_EPOCH serial date. Note that this quantity may be negative if the specified date occurs before the compact-binary date epoch.

Parameters

NameDescription
daysSinceEpochdestination for the day count relative to the epoch
datedate to convert