Public Member Functions | |
| TimeStamp (int year, int month, int day, int hour, int minute, int sec, int usec=0) | |
| Overloaded constructor. | |
| int | getDate (int &year, int &month, int &day) |
| get year, month, day from the date part of the timestamp | |
| void | getDate (Date &newDate) const |
| get the date part of the timestamp | |
| int | setDate (int year, int month, int day) |
| sets the date with specified year, month, day | |
| void | setDate (const Date &newDate) |
| set the date part of the timestamp | |
| int | getTime (int &hours, int &mins, int &secs) const |
| retrieves the time using IN parameters | |
| void | getTime (Time &newTime) const |
| retrieves the time part of the timestamp | |
| int | setTime (int hours, int mins, int secs, int usec=0) |
| sets the time with specified hours, mins, secs | |
| void | setTime (const Time &newTime) |
| set the time part of the timestamp | |
| bool | isValid () const |
| checks for the validity of the timestamp | |
| void | setNull () |
| resets the date and time | |
| int | dayOfWeek () const |
| returns day of the week. | |
| const char * | dayOfWeekName () const |
| returns day of the week. | |
| const char * | dayOfWeekAbbr () const |
| returns day of the week abbreviation values are "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" | |
| int | dayOfMonth () const |
| returns the day of the month. | |
| int | month () const |
| returns the month. | |
| const char * | monthName () const |
| returns the month name values are "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" | |
| const char * | monthAbbr () const |
| returns the month name abbreviation Values are "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" | |
| int | year () const |
| returns the year | |
| int | seconds () const |
| returns the seconds | |
| int | minutes () const |
| returns the minutes | |
| int | hours () const |
| returns the hours | |
| int | msec () const |
| returns the millisecs | |
| int | usec () const |
| returns the microsecs | |
| int | setMsec (int ms) |
| sets the millisecs | |
| int | setUsec (int us) |
| sets the microsecs | |
| int | parseDateFrom (const char *s) |
| parses the date string passed and stores it It should of the format "mm/dd/yyyy" | |
| int | parseTimeFrom (const char *s) |
| parses the time string passed and stores it It should of the format "hh:mm::ss" | |
| TimeStamp::TimeStamp | ( | int | year, | |
| int | month, | |||
| int | day, | |||
| int | hour, | |||
| int | minute, | |||
| int | sec, | |||
| int | usec = 0 | |||
| ) | [inline] |
Overloaded constructor.
| year | year | |
| month | month | |
| day | day | |
| hours | hours | |
| mins | mins | |
| secs | secs | |
| usec | usec |
| int TimeStamp::dayOfMonth | ( | ) | const [inline] |
returns the day of the month.
Values are 1 to 31
| int TimeStamp::dayOfWeek | ( | ) | const [inline] |
returns day of the week.
Values are 1-7
| const char* TimeStamp::dayOfWeekName | ( | ) | const [inline] |
returns day of the week.
values are "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Satur day".
| void TimeStamp::getDate | ( | Date & | newDate | ) | const [inline] |
| int TimeStamp::getDate | ( | int & | year, | |
| int & | month, | |||
| int & | day | |||
| ) | [inline] |
get year, month, day from the date part of the timestamp
| year | year IN | |
| month | month IN | |
| day | day IN |
| void TimeStamp::getTime | ( | Time & | newTime | ) | const [inline] |
| int TimeStamp::getTime | ( | int & | hours, | |
| int & | mins, | |||
| int & | secs | |||
| ) | const [inline] |
retrieves the time using IN parameters
| hours | hours | |
| mins | mins | |
| secs | secs |
| int TimeStamp::month | ( | ) | const [inline] |
returns the month.
Values are 1 to 12.
| void TimeStamp::setDate | ( | const Date & | newDate | ) | [inline] |
| int TimeStamp::setDate | ( | int | year, | |
| int | month, | |||
| int | day | |||
| ) | [inline] |
sets the date with specified year, month, day
| year | year | |
| month | month | |
| day | day |
| void TimeStamp::setTime | ( | const Time & | newTime | ) | [inline] |
| int TimeStamp::setTime | ( | int | hours, | |
| int | mins, | |||
| int | secs, | |||
| int | usec = 0 | |||
| ) | [inline] |
sets the time with specified hours, mins, secs
| hours | hours | |
| mins | mins | |
| secs | secs | |
| usec | usec |