#include <DateTime.hxx>
|
| DateTime | convertStringToDate (const std::string &value) |
| |
| | DateTime () |
| |
| | DateTime (time_t time) |
| |
| | DateTime (const DateTime &dateTime) |
| |
| | DateTime (const date_t &aDatetype) |
| |
| | DateTime (const std::string &time) |
| |
| | DateTime (int year, int month, int day, int hour=0, int minutes=0, int seconds=0) |
| |
| int | day () const |
| |
| int | day (int d) |
| |
| int | hour () const |
| |
| int | hour (int h) |
| |
| DateTime & | init (const DateTime &d2) |
| |
| DateTime & | init (int year, int month, int day, int hour=0, int minutes=0, int seconds=0) |
| |
| int | isLeapYear (int nYear) const |
| |
| int | isValid () const |
| |
| int | minute () const |
| |
| int | minute (int m) |
| |
| int | month () const |
| |
| int | month (int m) |
| |
| | operator date_t () const |
| |
| bool | operator!= (const DateTime &that) const |
| |
| DateTime | operator+ (const DateTime &that) const |
| |
| DateTime | operator+= (const DateTime &that) |
| |
| DateTime | operator- (const DateTime &that) const |
| |
| DateTime | operator-= (const DateTime &that) |
| |
| bool | operator< (const DateTime &that) const |
| |
| bool | operator<= (const DateTime &that) const |
| |
| DateTime & | operator= (const DateTime &that) |
| |
| bool | operator== (const DateTime &that) const |
| |
| bool | operator> (const DateTime &that) const |
| |
| bool | operator>= (const DateTime &that) const |
| |
| int | second () const |
| |
| int | second (int s) |
| |
| int | timeZoneOffset () const |
| |
| std::string | toString () const |
| |
| std::string | toString (const std::string &format) const |
| |
| time_t | toTime () const |
| |
| int | year () const |
| |
| int | year (int y) |
| |
| | ~DateTime () |
| |
Definition at line 25 of file DateTime.hxx.
| Teamcenter::DateTime::DateTime |
( |
| ) |
|
Default constructor creating an instance with the current date and time
| Teamcenter::DateTime::DateTime |
( |
time_t |
time | ) |
|
Construct a DateTime for the give time_t value (seconds elapsed since Jan 1, 1970, local time)
- Parameters
-
| time | seconds elapsed since Jan 1, 1970 |
| Teamcenter::DateTime::DateTime |
( |
const DateTime & |
dateTime | ) |
|
Copy constructor from another instance of DateTime.
- Parameters
-
| Teamcenter::DateTime::DateTime |
( |
const date_t & |
aDatetype | ) |
|
Copy constructor from instance of date_t (local time).
- Parameters
-
| aDatetype | Existing date_t value. |
| Teamcenter::DateTime::DateTime |
( |
const std::string & |
time | ) |
|
Construct a date by parsing a string with the format yyyy-MM-ddThh:mm:ss zz:zz.
2005-05-20T14:32:05-08:00
Where the -08:00 is minus 8 hours from GTM (Pacific Standard Time).
The time-zone offset may exclude the ':'
2005-05-20T14:32:05-0800
An empty string will construct a Null date (getNullDate()) instance.
- Parameters
-
| time | String to parse (yyyy-MM-ddThh:mm:ss zz:zz). |
| Teamcenter::DateTime::DateTime |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day, |
|
|
int |
hour = 0, |
|
|
int |
minutes = 0, |
|
|
int |
seconds = 0 |
|
) |
| |
Construct a date from the given local time input values.
- Parameters
-
| year | yyyy |
| month | 1-12 (January = 1) |
| day | 1-31 |
| hour | 0-23 |
| minutes | 0-59 |
| seconds | 0-59 |
| Teamcenter::DateTime::~DateTime |
( |
| ) |
|
|
inline |
| DateTime Teamcenter::DateTime::convertStringToDate |
( |
const std::string & |
value | ) |
|
Create a DateTime from a string with the format yyyy-MM-ddThh:mm:ss zz:zz.
2005-05-20T14:32:05-08:00
Where the -08:00 is minus 8 hours from GTM (Pacific Standard Time).
The time-zone offset may exclude the ':'
2005-05-20T14:32:05-0800
An empty string will construct a Null date (getNullDate()) instance.
- Parameters
-
| time | String to parse (yyyy-MM-ddThh:mm:ss zz:zz) |
| static tm Teamcenter::DateTime::dateElementsToTm |
( |
const date_t & |
dateTime | ) |
|
|
staticprivate |
| int Teamcenter::DateTime::day |
( |
| ) |
const |
|
inline |
- Returns
- The day (1..31), local time
Definition at line 151 of file DateTime.hxx.
| int Teamcenter::DateTime::day |
( |
int |
d | ) |
|
|
inline |
| int Teamcenter::DateTime::getLocalGMTOffset |
( |
int |
hour, |
|
|
int |
minute |
|
) |
| const |
|
private |
| static const DateTime Teamcenter::DateTime::getNullDate |
( |
| ) |
|
|
static |
Returns an instance of the Null DateTime object. This is the client equivalent of the Teamcenter POM date_t constant returned by the function POM_null_date().
| static int Teamcenter::DateTime::getTimeZoneOffset |
( |
| ) |
|
|
static |
Returns the local time-zone offset from GMT (minutes).
| static int Teamcenter::DateTime::getTimeZoneStandardOffset |
( |
| ) |
|
|
static |
| int Teamcenter::DateTime::hour |
( |
| ) |
const |
|
inline |
- Returns
- The hour (0..23), local time
Definition at line 155 of file DateTime.hxx.
| int Teamcenter::DateTime::hour |
( |
int |
h | ) |
|
|
inline |
| DateTime& Teamcenter::DateTime::init |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day, |
|
|
int |
hour = 0, |
|
|
int |
minutes = 0, |
|
|
int |
seconds = 0 |
|
) |
| |
| void Teamcenter::DateTime::initStatics |
( |
| ) |
const |
|
private |
| bool Teamcenter::DateTime::isDayLight |
( |
| ) |
const |
|
private |
| int Teamcenter::DateTime::isLeapYear |
( |
int |
nYear | ) |
const |
| int Teamcenter::DateTime::isValid |
( |
| ) |
const |
| int Teamcenter::DateTime::minute |
( |
| ) |
const |
|
inline |
- Returns
- The minute (0..59), local time
Definition at line 159 of file DateTime.hxx.
| int Teamcenter::DateTime::minute |
( |
int |
m | ) |
|
|
inline |
| int Teamcenter::DateTime::month |
( |
| ) |
const |
|
inline |
- Returns
- The month (1..12), local time
Definition at line 147 of file DateTime.hxx.
| int Teamcenter::DateTime::month |
( |
int |
m | ) |
|
|
inline |
| Teamcenter::DateTime::operator date_t |
( |
| ) |
const |
|
inline |
- Returns
- A date_t struct (local time) representing the current DateTime.
Definition at line 175 of file DateTime.hxx.
| bool Teamcenter::DateTime::operator!= |
( |
const DateTime & |
that | ) |
const |
|
inline |
| bool Teamcenter::DateTime::operator< |
( |
const DateTime & |
that | ) |
const |
| bool Teamcenter::DateTime::operator<= |
( |
const DateTime & |
that | ) |
const |
|
inline |
| bool Teamcenter::DateTime::operator== |
( |
const DateTime & |
that | ) |
const |
| bool Teamcenter::DateTime::operator> |
( |
const DateTime & |
that | ) |
const |
| bool Teamcenter::DateTime::operator>= |
( |
const DateTime & |
that | ) |
const |
|
inline |
| int Teamcenter::DateTime::second |
( |
| ) |
const |
|
inline |
- Returns
- The seconds (0..59), local time
Definition at line 163 of file DateTime.hxx.
| int Teamcenter::DateTime::second |
( |
int |
s | ) |
|
|
inline |
| int Teamcenter::DateTime::timeZoneOffset |
( |
| ) |
const |
Returns the timezone offset of this date.
- Returns
- offset from GMT (minutes)
| static date_t Teamcenter::DateTime::tmToDate |
( |
const tm & |
date | ) |
|
|
staticprivate |
| std::string Teamcenter::DateTime::toString |
( |
| ) |
const |
Returns the date in a string with the format yyyy-MM-ddThh:mm:ss zz:zz
- Returns
- The date as a string
| std::string Teamcenter::DateTime::toString |
( |
const std::string & |
format | ) |
const |
Returns the date in a string with the given format.
- Parameters
-
| format | Format string with codes defined by the strftime function ( i.e. Y = year in decimal, with the century) |
- Returns
- The date as a string
| time_t Teamcenter::DateTime::toTime |
( |
| ) |
const |
Returns the date as seconds elapsed since Jan 1, 1970, local time. Any dates prior to 1970 will return a -1, this includes the NullDate.
- Returns
- seconds elapsed since Jan 1, 1970, local time
| int Teamcenter::DateTime::year |
( |
| ) |
const |
|
inline |
- Returns
- The four digit year, local time
Definition at line 142 of file DateTime.hxx.
| int Teamcenter::DateTime::year |
( |
int |
y | ) |
|
|
inline |
| date_t Teamcenter::DateTime::m_dateTime |
|
private |
| int Teamcenter::DateTime::s_daylightOffset |
|
staticprivate |
| std::string Teamcenter::DateTime::s_NullDateString |
|
staticprivate |
| int Teamcenter::DateTime::s_standardOffset |
|
staticprivate |
The documentation for this class was generated from the following file: