#include <OdTimeStamp.h>
|
| OdTimeStamp () |
|
| OdTimeStamp (InitialValue init) |
|
void | getDate (short &month, short &day, short &year) const |
|
void | setDate (short month, short day, short year) |
|
short | month () const |
|
void | setMonth (short month) |
|
short | day () const |
|
void | setDay (short day) |
|
short | year () const |
|
void | setYear (short year) |
|
void | getTime (short &hour, short &minute, short &second, short &millisecond) const |
|
void | setTime (short hour, short minute, short second, short millisecond) |
|
short | hour () const |
|
void | setHour (short hour) |
|
short | minute () const |
|
void | setMinute (short minute) |
|
short | second () const |
|
void | setSecond (short second) |
|
short | millisecond () const |
|
void | setMillisecond (short millisecond) |
|
void | setToZero () |
|
void | getLocalTime () |
|
void | getUniversalTime () |
|
void | localToUniversal () |
|
void | universalToLocal () |
|
OdUInt32 | julianDay () const |
|
void | setJulianDay (OdUInt32 julianDay) |
|
OdUInt32 | msecsPastMidnight () const |
|
void | setMsecsPastMidnight (OdUInt32 msecsPastMidnight) |
|
void | setJulianDate (OdUInt32 julianDay, OdUInt32 msecsPastMidnight) |
|
double | julianFraction () const |
|
void | setJulianFraction (double julianFraction) |
|
bool | operator== (const OdTimeStamp &tStamp) const |
|
bool | operator!= (const OdTimeStamp &tStamp) const |
|
bool | operator> (const OdTimeStamp &tStamp) const |
|
bool | operator>= (const OdTimeStamp &tStamp) const |
|
bool | operator< (const OdTimeStamp &tStamp) const |
|
bool | operator<= (const OdTimeStamp &tStamp) const |
|
const OdTimeStamp | operator+ (const OdTimeStamp &tStamp) const |
|
const OdTimeStamp | operator- (const OdTimeStamp &tStamp) const |
|
const OdTimeStamp & | operator+= (const OdTimeStamp &tStamp) |
|
const OdTimeStamp & | operator-= (const OdTimeStamp &tStamp) |
|
const OdTimeStamp & | add (const OdTimeStamp &tStamp) |
|
const OdTimeStamp & | subtract (const OdTimeStamp &tStamp) |
|
void | ctime (class OdString &timeString) const |
|
void | strftime (const OdString &format, OdString &timeString) const |
|
OdInt64 | packedValue () const |
|
void | setPackedValue (OdInt64 t) |
|
short | weekday () const |
|
This class represents TimeStamp objects in an OdDbDatabase instance.
- See also
- TD_Db
<group Other_Classes>
Definition at line 41 of file OdTimeStamp.h.
◆ InitialValue
Enumerator |
---|
kInitZero | |
kInitLocalTime | |
kInitUniversalTime | |
Definition at line 44 of file OdTimeStamp.h.
◆ OdTimeStamp() [1/2]
OdTimeStamp::OdTimeStamp |
( |
| ) |
|
- Parameters
-
init must be one of the following:
Value Description kInitZero 1 Midnight, January 1, 1970, UTC. kInitLocalTime 2 Workstation date in local time. kInitUniversalTime 3 Workstation date in Universal (Greenwich Mean) Time.
◆ OdTimeStamp() [2/2]
◆ add()
Adds the specified TimeStamp object to this TimeStamp object, and returns the sum.
- Parameters
-
Definition at line 328 of file OdTimeStamp.h.
◆ ctime()
void OdTimeStamp::ctime |
( |
class OdString & |
timeString | ) |
const |
Returns this TimeStamp object as standard formatted string.
- Parameters
-
timeString | [out] Receives the formatted time string. |
◆ day()
short OdTimeStamp::day |
( |
| ) |
const |
Returns the day of this TimeStamp object.
◆ getDate()
void OdTimeStamp::getDate |
( |
short & |
month, |
|
|
short & |
day, |
|
|
short & |
year |
|
) |
| const |
Returns the date of this TimeStamp object.
- Parameters
-
month | [out] Receives the month. |
day | [out] Receives the day. |
year | [out] Receives the year. |
◆ getLocalTime()
void OdTimeStamp::getLocalTime |
( |
| ) |
|
Sets this TimeStamp object to the workstation date in local time.
◆ getTime()
void OdTimeStamp::getTime |
( |
short & |
hour, |
|
|
short & |
minute, |
|
|
short & |
second, |
|
|
short & |
millisecond |
|
) |
| const |
Returns the time of this TimeStamp object.
- Parameters
-
hour | [out] Receives the hour. |
minute | [out] Receives the minute. |
second | [out] Receives the second. |
millisecond | [out] Receives the millisecond. |
◆ getUniversalTime()
void OdTimeStamp::getUniversalTime |
( |
| ) |
|
Sets this TimeStamp object to the workstation date in Universal (Greenwich Mean) Time.
◆ hour()
short OdTimeStamp::hour |
( |
| ) |
const |
Returns the hour of this TimeStamp object.
◆ julianDay()
OdUInt32 OdTimeStamp::julianDay |
( |
| ) |
const |
Returns the Julian day of this TimeStamp object.
◆ julianFraction()
double OdTimeStamp::julianFraction |
( |
| ) |
const |
Returns the fraction of the Julian date of this TimeStamp object.
◆ localToUniversal()
void OdTimeStamp::localToUniversal |
( |
| ) |
|
Converts this TimeStamp object from local time to Universal (Greenwich Mean) Time.
◆ millisecond()
short OdTimeStamp::millisecond |
( |
| ) |
const |
Returns the millisecond of this TimeStamp object.
◆ minute()
short OdTimeStamp::minute |
( |
| ) |
const |
Returns the minute of this TimeStamp object.
◆ month()
short OdTimeStamp::month |
( |
| ) |
const |
Returns the month of this TimeStamp object.
◆ msecsPastMidnight()
OdUInt32 OdTimeStamp::msecsPastMidnight |
( |
| ) |
const |
Returns the milliseconds past midnight for this TimeStamp object.
◆ operator!=()
bool OdTimeStamp::operator!= |
( |
const OdTimeStamp & |
tStamp | ) |
const |
|
inline |
◆ operator+()
◆ operator+=()
◆ operator-()
◆ operator-=()
◆ operator<()
bool OdTimeStamp::operator< |
( |
const OdTimeStamp & |
tStamp | ) |
const |
◆ operator<=()
bool OdTimeStamp::operator<= |
( |
const OdTimeStamp & |
tStamp | ) |
const |
|
inline |
◆ operator==()
bool OdTimeStamp::operator== |
( |
const OdTimeStamp & |
tStamp | ) |
const |
◆ operator>()
bool OdTimeStamp::operator> |
( |
const OdTimeStamp & |
tStamp | ) |
const |
◆ operator>=()
bool OdTimeStamp::operator>= |
( |
const OdTimeStamp & |
tStamp | ) |
const |
|
inline |
◆ packedValue()
OdInt64 OdTimeStamp::packedValue |
( |
| ) |
const |
Returns this TimeStamp object as long.
If this TimeStamp object contains a date before midnight, January 1, 1970, UTC, or after 3:14:07 on January 19, 2038, UT, packedValue() returns -1.
◆ second()
short OdTimeStamp::second |
( |
| ) |
const |
Returns the second of this TimeStamp object.
◆ setDate()
void OdTimeStamp::setDate |
( |
short |
month, |
|
|
short |
day, |
|
|
short |
year |
|
) |
| |
Sets the date of this TimeStamp object.
- Parameters
-
month | [in] Month. |
day | [in] Day. |
year | [in] Year. |
◆ setDay()
void OdTimeStamp::setDay |
( |
short |
day | ) |
|
Sets the day of this TimeStamp object.
- Parameters
-
◆ setHour()
void OdTimeStamp::setHour |
( |
short |
hour | ) |
|
Sets the hour of this TimeStamp object.
- Parameters
-
◆ setJulianDate()
Sets the Julian Date for this TimeStamp object.
- Parameters
-
julianDay | [in] Julian day. |
msecsPastMidnight | [in] Milliseconds past midnight. |
◆ setJulianDay()
Sets the Julian day of this TimeStamp object.
- Parameters
-
julianDay | [in] Julian day. |
◆ setJulianFraction()
void OdTimeStamp::setJulianFraction |
( |
double |
julianFraction | ) |
|
Sets the fraction of the Julian date of this TimeStamp object.
- Parameters
-
julianFraction | [in] Julian fraction. |
◆ setMillisecond()
void OdTimeStamp::setMillisecond |
( |
short |
millisecond | ) |
|
Sets the millisecond of this TimeStamp object.
- Parameters
-
millisecond | [in] Millisecond. |
◆ setMinute()
void OdTimeStamp::setMinute |
( |
short |
minute | ) |
|
Sets the minute of this TimeStamp object.
- Parameters
-
◆ setMonth()
void OdTimeStamp::setMonth |
( |
short |
month | ) |
|
Sets the month of this TimeStamp object.
- Parameters
-
◆ setMsecsPastMidnight()
void OdTimeStamp::setMsecsPastMidnight |
( |
OdUInt32 |
msecsPastMidnight | ) |
|
Sets the milliseconds past midnight for this TimeStamp object.
- Parameters
-
msecsPastMidnight | [in] Milliseconds past midnight. |
◆ setPackedValue()
◆ setSecond()
void OdTimeStamp::setSecond |
( |
short |
second | ) |
|
Sets the second of this TimeStamp object.
- Parameters
-
◆ setTime()
void OdTimeStamp::setTime |
( |
short |
hour, |
|
|
short |
minute, |
|
|
short |
second, |
|
|
short |
millisecond |
|
) |
| |
Sets the time of this TimeStamp object.
- Parameters
-
hour | [in] Hour. |
minute | [in] Minute. |
second | [in] Second. |
millisecond | [in] Millisecond. |
◆ setToZero()
void OdTimeStamp::setToZero |
( |
| ) |
|
Sets this TimeStamp object to Midnight, January 1, 1970, UTC.
◆ setYear()
void OdTimeStamp::setYear |
( |
short |
year | ) |
|
Sets the year of this TimeStamp object.
- Parameters
-
◆ strftime()
Returns this TimeStamp object as a user-formatted string.
- Parameters
-
timeString | [out] Receives the formatted time string. |
format | [in] Format string. |
Description a Short weekday A Full weekday b Short month B Full month c Short date and time for current locale %#c Long date and time for current locale d Day of month (01 - 31) %#d Day of month (1 - 31) H Hour in 24 hour format (00 - 23) %#H Hour in 24 hour format (0 - 23) I Hour in 12 hour format (01 - 12) %#I Hour in 12 hour format (1 - 12) j Day of year (001 - 366) %#j Day of year (1 - 366) m Month (01 - 12) %#m Month (1 - 12) M Minute (00 - 59) %#M Minute (0 - 59) p AM/PM indicator for current local S Second (00 - 59) %#S Second (0 - 59) U Week of the year, first day of week is Sunday (00 - 53) %#U Week of the year, first day of week is Sunday (0 - 53) w Weekday, Sunday is 0, (0 - 6) %w Weekday, Sunday is 0, (0 - 6) W Week of the year, first day of week is Monday (00 - 53) %#W Week of the year, first day of week is Monday (0 - 53) x Date for the current locale X Time for the current locale y Year without century (00 - 99) %y Year without century (0 - 99) Y Year with century
Y Year with century, no leading zeros z Time-zone name
Z Time zone abbreviation
◆ subtract()
Subtracts the specified TimeStamp object from this TimeStamp object, and returns the difference.
- Parameters
-
Definition at line 339 of file OdTimeStamp.h.
◆ universalToLocal()
void OdTimeStamp::universalToLocal |
( |
| ) |
|
Converts this TimeStamp object from Universal (Greenwich Mean) Time to local time.
◆ weekday()
short OdTimeStamp::weekday |
( |
| ) |
const |
◆ year()
short OdTimeStamp::year |
( |
| ) |
const |
Returns the year of this TimeStamp object.
The documentation for this class was generated from the following file: