Date Class
Topics
:Overview
Conditional Directives
Type Definitions
Functions
The date class is used by database applications to represent system date values independently of the operating system or hardware platform used. The CDate class represents a date type using a two-digit month, a two-digit day, and a four-digit year:
__UBYTE__ Month; __UBYTE__ Day; gxUINT16 Year;
The type definitions and classes use to represent unsigned bytes and unsigned short integers are used to create platform interoperable date strings that can be written to database files.
__USE_CPP_IOSTREAM__ - Conditional directive used to enable CPP iostream functions.
CDate::CDate()
CDate::GetDay()
CDate::GetMonth()
CDate::GetYear()
CDate::SetDate()
CDate::SetDay()
CDate::SetMonth()
CDate::SetYear()
CDate::SizeOf()
CDate::c_str()
CDate::day_c_str()
CDate::month_c_str()
CDate::year_c_str()
CDate::CDate(__UBYTE__ month, __UBYTE__ day, gxUINT16 year)
- Class constructor used to construct a CDate object with a specified month, day, and year. - Class copy constructor use to copy construct a CDate object.CDate& CDate::operator=(const CDate& ob)
- Assignment operator used to assign the specified CDate object to the object that invoked the call. - Public member function that returns the current day. - Public member function that returns the current month. - Public member function that returns the current year.void CDate::SetDate(__UBYTE__ month, __UBYTE__ day, gxUINT16 year)
- Public member function used to set the month, the day, and the year.void CDate::SetDay(__UBYTE__ byte)
- Public member function used to set the day.void CDate::SetMonth(__UBYTE__ byte)
- Public member function used to set the monthvoid CDate::SetYear(gxUINT16 uint16)
- Public member function used to set the year. - Public member function that returns the size of a CDate object. - Public member function that returns the month, day and year in the form of a null-terminated string: MM/DD/YYYY. The calling function is responsible for freeing the memory allocated for the string returned by this function. - Public member function that returns the day in the form of a null-terminated string. The calling function is responsible for freeing the memory allocated for the string returned by this function. - Public member function that returns the month in the form of a null-terminated string. The calling function is responsible for freeing the memory allocated for the string returned by this function. - Public member function that returns the year in the form of a null-terminated string. The calling function is responsible for freeing the memory allocated for the string returned by this function.
End Of Document |