DataReelDataReelC++ Toolkit Documentation

Date Type

CDate is the 4-byte date type stored in gxRDBMS DATE fields.

Contents

Overview
Functions

Overview

The layout (month byte, day byte, 16-bit year) is part of the gxRDBMS file format and is unchanged. Comparisons order dates by year, month and day. Use std::chrono for date arithmetic.

Functions

CDate::CDate(__UBYTE__ month, __UBYTE__ day, gxUINT16 year)

Constructs a date.

explicit CDate::CDate(std::string_view date, char delimiter = '/')

Parses M/D/YYYY.

bool CDate::SetDate(std::string_view date, char delimiter = '/')

Parses M/D/YYYY. Returns false, leaving 0/0/0, for text that is not a valid date.

std::string CDate::str() const / month_str() / day_str() / year_str()

Text forms (they replace the 6.x c_str() functions, which leaked memory).

GetDay() / GetMonth() / GetYear() / SetDay() / SetMonth() / SetYear()

Field access.

operator== != < > and operator<<

Comparison and stream output.