C++
ACDBCORE2D_PORT void setMonth( int );
Description
Sets month to be the AcDbDate object's month of the year value. Must be in the range 1 to 12.
Warning
This class does not rationalize or validate input. Be careful to check the state of the object against your input data before setting date elements individually. For instance, if you set the month to a value that is invalid for the current day setting, or vice versa, the internal Julian date calculation may yield unintended results, as shown below:
AcDbDate mydate(AcDbDate::kInitLocalTime); // the date today happens to be 10/31/2005 // this call asks the date class to set the date to 9/31, // which doesn't exist mydate.setMonth(9); // date has been 'rolled over' to 10/1 mydate.setDay(21); // date is now 10/21 instead of 9/21
For best consistency and efficiency, use the setDate() function.
Parameters
Parameters | Description |
---|---|
unnamed | Input month value |
Links
Previous Declaration
void setMonth(
short
);