Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TTime
Inherited By:
TSQLTimestamp
Purpose:
TSQLDate is a concrete class with an accuracy of up to a second. It is intended for calendars, appointments, or any other client context that demands a time based on a reference date.
Time is measured in seconds from the reference date of March 1, 2000. Dates earlier than the reference date are negative. Later dates are positive.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TSQLDate ()
- TSQLDate (const TSQLDate & time)
- TSQLDate (const TSQLTimestamp & time)
- TSQLDate (double secs)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
- Constructs a date from a time stamp.
- Constructs a date object based on the specified number of seconds from a reference date.
Calling Context:
- Called by the stream-in operators and any other function that needs to construct an uninitialized object.
- Called to copy an object.
- Call this function directly.
- Call this function directly.
Parameters:
- Takes no parameters.
- const TSQLDate & time -The object to copy.
- const TSQLTimestamp & time -The time stamp object to use in building the date object.
- double secs -The number of seconds relative to the reference date.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TSQLDate ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLDate::operator=
TSQLDate & operator =(const TSQLDate &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
- const TSQLDate & -The date to assign to this object.
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLDate::GetSeconds
virtual double GetSeconds () const
Interface Category:
API.
Purpose:
Returns the number of seconds elapsed since the reference date. Negative values indicate dates preceding the reference date.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The number of seconds elapsed since the reference date.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.