User interface class. More...
#include <ilviews/dataccess/date.h>
| Public Member Functions | |
| IliDate () | |
| This constructor creates an IliDateobject corresponding to 0h00 on 1st January 1901. | |
| IliDate (const IliDate &) | |
| This is the copy constructor of class IliDate. | |
| IliDate (IlInt y, IlInt mo, IlInt d, IlInt h=0, IlInt m=0, IlInt s=0) | |
| This constructor creates a date object where the date is provided by the parameters.  More... | |
| IlInt | getFirstYearDayOfMonth () const | 
| Returns the day of the year of the first day in the month of the date object.  More... | |
| IlInt | getHour () const | 
| Returns the hour of the time part of the date object as an integer between 0 and 23.  More... | |
| IlInt | getMilliseconds () const | 
| Returns the milliseconds of the date object as an integer between 0 and 999.  More... | |
| IlInt | getMinutes () const | 
| Returns the minutes of the time part of a date object as an integer between 0 and 59.  More... | |
| IlInt | getMonth () const | 
| Returns the month part of the date as an integer between 1 and 12.  More... | |
| IlInt | getMonthDay () const | 
| Returns the month day of the date object as an integer between 1 and 31.  More... | |
| IlInt | getMonthDaysCount () const | 
| Returns the number of days that occur in the month of the date object.  More... | |
| IlInt | getQuarter () const | 
| Returns the quarter of the date object as an integer between 1 and 4.  More... | |
| IlInt | getSeconds () const | 
| Returns the seconds of the time part of a date object as an integer between 0 and 59.  More... | |
| IlInt | getWeekDay () const | 
| Returns the day of the week of the date object as an integer between 1 and 7.  More... | |
| IlInt | getYear () const | 
| Returns the year part of the date (for example, 1996).  More... | |
| IlInt | getYearDay () const | 
| Returns the day of the year of the date object as an integer value between 1 and 366.  More... | |
| IlInt | getYearWeek () const | 
| Returns the week of the year of the date object as an integer between 1 and 53.  More... | |
| IlBoolean | hasTime () const | 
| Returns IlTrueif the time part of the date object differs from 0h00. | |
| IlBoolean | isDayValid () const | 
| Returns IlFalseif the day of the month part of the date object is not a valid day, according to the month and year.  More... | |
| IlBoolean | isLeap () const | 
| Returns IlTrueif the year is a leap year.  More... | |
| IlBoolean | isLeapYear () const | 
| Returns IlTrueif the year is a leap year.  More... | |
| operator struct tm () const | |
| Returns a struct tm describing the same date as this object.  More... | |
| int | operator!= (const IliDate &d) const | 
| Compares two IliDate objects.  More... | |
| int | operator< (const IliDate &d) const | 
| Compares two IliDate objects.  More... | |
| int | operator<= (const IliDate &d) const | 
| Compares two IliDate objects.  More... | |
| IliDate & | operator= (const IliDate &d) | 
| This operator lets you copy one date format into another date.  More... | |
| IliDate & | operator= (const struct tm &t) | 
| Assigns this IliDateobject from astruct tm.  More... | |
| int | operator== (const IliDate &d) const | 
| Compares two IliDate objects.  More... | |
| int | operator> (const IliDate &d) const | 
| Compares two IliDate objects.  More... | |
| int | operator>= (const IliDate &d) const | 
| Compares two IliDate objects.  More... | |
| IlInt | operator[] (IliDateInfo ndx) const | 
| Returns the desired information.  More... | |
| void | read (std::istream &input) | 
| Reads a date object from an input stream.  More... | |
| void | setHour (IlInt h) | 
| Sets the hour of a date object.  More... | |
| void | setMilliseconds (IlInt ms) | 
| Sets the milliseconds of a date object.  More... | |
| void | setMinutes (IlInt m) | 
| Sets the minutes of a date object.  More... | |
| void | setMonth (IlInt m) | 
| Sets the month part of a date object.  More... | |
| void | setMonthDay (IlInt md) | 
| Sets the day of the month of the date object.  More... | |
| void | setSeconds (IlInt s) | 
| Sets the seconds of a date object.  More... | |
| void | setYear (IlInt y) | 
| Sets the year part of the date.  More... | |
| void | write (std::ostream &output) const | 
| Writes a date object to an output stream in a format that allows the date to be read back by the read()member function.  More... | |
| Friends | |
| class | IliTime | 
User interface class.
Library: dataccess
The IliDate class is used to hold date and time information. This information may be represented by mm/dd/yyyy hh:mm:ss. This class can manage the milliseconds, however some databases does not support the milliseconds. 
This constructor creates a date object where the date is provided by the parameters.
| y | The year. | 
| mo | The month. | 
| d | The day. | 
| h | The hours. | 
| m | The minutes. | 
| s | The seconds. | 
| IlInt IliDate::getFirstYearDayOfMonth | ( | ) | const | 
Returns the day of the year of the first day in the month of the date object.
The day of the year is a number between 1 and 366.
| IlInt IliDate::getHour | ( | ) | const | 
Returns the hour of the time part of the date object as an integer between 0 and 23.
| IlInt IliDate::getMilliseconds | ( | ) | const | 
Returns the milliseconds of the date object as an integer between 0 and 999.
| IlInt IliDate::getMinutes | ( | ) | const | 
Returns the minutes of the time part of a date object as an integer between 0 and 59.
| IlInt IliDate::getMonth | ( | ) | const | 
Returns the month part of the date as an integer between 1 and 12.
| IlInt IliDate::getMonthDay | ( | ) | const | 
Returns the month day of the date object as an integer between 1 and 31.
| IlInt IliDate::getMonthDaysCount | ( | ) | const | 
Returns the number of days that occur in the month of the date object.
This member function takes the year into account.
| IlInt IliDate::getQuarter | ( | ) | const | 
Returns the quarter of the date object as an integer between 1 and 4.
| IlInt IliDate::getSeconds | ( | ) | const | 
Returns the seconds of the time part of a date object as an integer between 0 and 59.
| IlInt IliDate::getWeekDay | ( | ) | const | 
Returns the day of the week of the date object as an integer between 1 and 7.
| IlInt IliDate::getYear | ( | ) | const | 
Returns the year part of the date (for example, 1996).
| IlInt IliDate::getYearDay | ( | ) | const | 
Returns the day of the year of the date object as an integer value between 1 and 366.
| IlInt IliDate::getYearWeek | ( | ) | const | 
Returns the week of the year of the date object as an integer between 1 and 53.
| IlBoolean IliDate::isDayValid | ( | ) | const | 
Returns IlFalse if the day of the month part of the date object is not a valid day, according to the month and year. 
IlTrue if the day is valid. | IlBoolean IliDate::isLeap | ( | ) | const | 
Returns IlTrue if the year is a leap year. 
OBSOLETE Function, you should use the isLeapYear function. 
IlTrue if the year is a leap year. | IlBoolean IliDate::isLeapYear | ( | ) | const | 
Returns IlTrue if the year is a leap year. 
| IliDate::operator struct tm | ( | ) | const | 
Returns a struct tm describing the same date as this object.
Note that:
struct tm whereas it starts from 1 in an IliDate object. struct tm. | int IliDate::operator!= | ( | const IliDate & | d | ) | const | 
Compares two IliDate objects.
| d | The second date. | 
1 if the first date is not equal to the second date, otherwise returns 0. | int IliDate::operator< | ( | const IliDate & | d | ) | const | 
Compares two IliDate objects.
| d | The second date. | 
1 if the first date is smaller than the second date, otherwise returns 0. | int IliDate::operator<= | ( | const IliDate & | d | ) | const | 
Compares two IliDate objects.
| d | The second date. | 
1 if the first date is equal or smaller than the second date, otherwise returns 0. This operator lets you copy one date format into another date.
| d | The new value. | 
| IliDate& IliDate::operator= | ( | const struct tm & | t | ) | 
Assigns this IliDate object from a struct tm. 
| t | The new values. | 
| int IliDate::operator== | ( | const IliDate & | d | ) | const | 
Compares two IliDate objects.
| d | The second date. | 
1 if the first date is equal to the second date, otherwise returns 0. | int IliDate::operator> | ( | const IliDate & | d | ) | const | 
Compares two IliDate objects.
| d | The second date. | 
1 if the first date is bigger than the second date, otherwise returns 0. | int IliDate::operator>= | ( | const IliDate & | d | ) | const | 
Compares two IliDate objects.
| d | The second date. | 
1 if the first date is equal or bigger than the second date, otherwise returns 0. | IlInt IliDate::operator[] | ( | IliDateInfo | ndx | ) | const | 
Returns the desired information.
| ndx | The information index. | 
-1. | void IliDate::read | ( | std::istream & | input | ) | 
Reads a date object from an input stream.
| input | The input stream. | 
| void IliDate::setHour | ( | IlInt | h | ) | 
Sets the hour of a date object.
| h | The hours (an integer between 0 and 23). | 
| void IliDate::setMilliseconds | ( | IlInt | ms | ) | 
Sets the milliseconds of a date object.
| ms | The milliseconds (an integer between 0 and 999). | 
| void IliDate::setMinutes | ( | IlInt | m | ) | 
Sets the minutes of a date object.
| m | The minutes (an integer between 0 and 59). | 
| void IliDate::setMonth | ( | IlInt | m | ) | 
Sets the month part of a date object.
| m | The month (an integer between 1 and 12). | 
| void IliDate::setMonthDay | ( | IlInt | md | ) | 
Sets the day of the month of the date object.
| md | The month day (an integer between 1 and 31). | 
| void IliDate::setSeconds | ( | IlInt | s | ) | 
Sets the seconds of a date object.
| s | The seconds (an integer between 0 and 59). | 
| void IliDate::setYear | ( | IlInt | y | ) | 
Sets the year part of the date.
| y | The year. | 
| void IliDate::write | ( | std::ostream & | output | ) | const | 
Writes a date object to an output stream in a format that allows the date to be read back by the read() member function. 
| output | The output stream. |