Constructors

Synopses

Declared in <bdlt_datetime.h>

Create a Datetime object whose "date" and "time" parts have their respective default‐constructed values, "0001/01/01" and "24:00:00.000000".

Create a Datetime object having the value of the specified original object.

Datetime(Datetime const& original);

Create a Datetime object whose "date" part has the value of the specified date and whose "time" part has the value "00:00:00.000000".

Datetime(Date const& date);

Create a Datetime object whose "date" and "time" parts have the values of the specified date and time, respectively.

Datetime(
    Date const& date,
    Time const& time);

Create a Datetime object whose "date" part has the value represented by the specified year, month, and day attributes, and whose "time" part has the value represented by the optionally specified hour, minute, second, millisecond, and microsecond attributes. Unspecified trailing optional parameters default to 0. The behavior is undefined unless the eight attributes (collectively) represent a valid Datetime value (see isValid).

Datetime(
    int year,
    int month,
    int day,
    int hour = 0,
    int minute = 0,
    int second = 0,
    int millisecond = 0,
    int microsecond = 0);

Created with MrDocs