AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

MgDateTime Class Reference
[MgDateTime]

Inherits MgSerializable.

List of all members.


Detailed Description

MgDateTime is used to store dates, times, or both.

Remarks:
The date and/or time can be modified using the various getters or setters that this class provides. MgDateTime represent date and time ranging from midnight (00:00:00), January 1, 1970 through 19:14:07 January 18, 2038, UTC.
Parameters:
year Year in the range of 1 to 9999
month Month in the range of 1 to 12 inclusive (January = 1)
day Day of the month in the range of 1 to 31 inclusive
hour Hour since midnight in the range of 0 to 23
minute Minutes after hour in the range of 0 to 59
second Seconds after minute in the range of 0 to 59
microsecond Microseconds after second in the range of 0 to 999999

Public Member Functions

INT8 GetDay ()
 Gets the day component of this object.
INT8 GetHour ()
 
INT32 GetMicrosecond ()
 
INT8 GetMinute ()
 
INT8 GetMonth ()
 
INT8 GetSecond ()
 
INT16 GetYear ()
 
bool IsDate ()
 Determines if this object only represents a date value.
bool IsDateTime ()
 Determines if this object represents both date and time values.
bool IsTime ()
 Determines if this object only represents a time value.
 MgDateTime (INT16 year, INT8 month, INT8 day, INT8 hour, INT8 minute, INT8 second, INT32 microsecond)
 Construct a date time value.
 MgDateTime (INT8 hour, INT8 minute, INT8 second, INT32 microsecond)
 Construct a time value.
 MgDateTime (INT16 year, INT8 month, INT8 day)
 Construct a date value.
 MgDateTime ()
 Construct a date time value initialized to the current date and time.
void SetDay (INT8 day)
 
void SetHour (INT8 hour)
 Sets the hour component of this object The Validate method should be called after the date time value has been fully specified by Set methods.
void SetMicrosecond (INT32 microsecond)
 Sets the microsecond component of this object The Validate method should be called after the date time value has been fully specified by Set methods.
void SetMinute (INT8 minute)
 Sets the minute component of this object The Validate method should be called after the date time value has been fully specified by Set methods.
void SetMonth (INT8 month)
 Sets the month component of this object The Validate method should be called after the date time value has been fully specified by Set methods.
void SetSecond (INT8 second)
 Sets the second component of this object The Validate method should be called after the date time value has been fully specified by Set methods.
void SetYear (INT16 year)
 Sets the year component of this object The Validate method should be called after the date time value has been fully specified by Set methods.
void Validate ()
 Validates the date time value. This method should be called after the date time value has been fully specified by Set methods.