Dates
Chapter Updated 06/19/24
| Method | Description |
|---|---|
| xbDate() xbDate( const char * Date8 ) xbDate( const xbString &Date8 ) xbDate( xbInt32 lJulDate ) xbDate( const xbDate &dtDate ) |
xbDate constructor. |
| xbDate( xbUInt16 iInit ) | Special xbDate constructor, called to initialize static variables and/or set to Sysdate |
| void operator=( const xbDate &d ) | Set a date equal to another date. |
| void operator+=( xbInt32 i ) | Increment a date. |
| void operator-=( xbInt32 i ) | Decrement a date. |
| void operator++( xbInt32 i ) | Increment a date. |
| void operator--( xbInt32 i ) | Decrement a date. |
| xbInt32 operator-( const xbDate & ) const | Determine the number of days between two dates. |
| const char * operator-( xbInt32 i ) | Subtract i days from a date. |
| const char * operator+( xbInt32 i ) | Add i days to a date. |
| xbBool operator==( const xbDate & ) const | Compare for equal dates. |
| xbBool operator!=( const xbDate & ) const | Compare for not equal dates. |
| xbBool operator< ( const xbDate & ) const | Compare for less than date. |
| xbBool operator> ( const xbDate & ) const | Compare for greater than date. |
| xbBool operator<=( const xbDate & ) const | Compare for less than or euql to date. |
| xbBool operator>=( const xbDate & ) const | Compare for greater than or equal to date. |
| xbInt16 CalcRollingCenturyForYear( xbInt16 year ) const | Calculate century for a give 2 digit year. Uses 80/20 method. |
| xbInt16 CenturyOf() const | Return century of the date. |
| xbInt16 CharDayOf( xbString &sOutCharDay ) | Retrieve the character day. |
| xbInt16 CharMonthOf( xbString &sOutCharMonth ) | Retrive the character month. |
| xbBool DateIsValid ( const xbString &sDate8 ) const; | Check if a given date is valid. |
| xbInt16 DayOf( xbInt16 iFormat ) const | Return Day of week, month or year depending on the option. |
| xbInt16 CTOD( const xbString &sCtodInDate ) | Sets the date from input date in format MM/DD/YY |
| xbInt16 FormatDate( const xbString &sFmtIn, xbString &sFmtOut ) | Create a formatted date string based on input format. |
| const char *Str() const | Return a pointer the date value. |
| xbBool IsLeapYear( xbInt16 iYear ) const IsLeapYear() const | Returns true if leap year, otherwise returns false. |
| xbBool IsNull() const | Returns xbTrue is the date is null, else returns false. |
| xbInt32 JulianDays() const | Return the Julian days value. |
| xbInt16 JulToDate8( xbInt32 lJulDate ) | Convert a Julian date to xbDate value. |
| xbInt16 LastDayOfMonth() | Calculate the last day of a month for the date object. |
| xbInt16 MonthOf() const | Return the numeric month of the date. |
| xbInt16 Set( const xbString &Date8 ) | Set the date to valid input date. |
| void Sysdate() | Set the date to the system date. |
| xbInt16 YearOf() const | Return the numeric year of the date. |
