#include <Date.hxx>
Public Member Functions | |
| Date () | |
| Default constructor. | |
| Date (int yyyymmdd) | |
| Constructor. | |
| Date (int yyyy, int mm, int dd=1, int hh=0, int mn=0, int sc=0) | |
| Constructor. | |
| void | SetDate (int yyyymmdd) |
| Sets the date. | |
| void | SetDate (int yyyy, int mm, int dd=1, int hh=0, int mn=0, int sc=0) |
| Sets the date. | |
| bool | LeapYear (int year) const |
| Is a given year a leap year? | |
| bool | LeapYear () const |
| Is the current year a leap year? | |
| int | GetDate () const |
| Returns the date in format YYYYMMDD. | |
| string | GetDate (const string &format) const |
| Returns the date in a given format. | |
| template<class T> void | GetDate (const string &format, T &date) const |
| Returns the date in a given format. | |
| int | GetYear () const |
| Returns the year. | |
| int | GetMonth () const |
| Returns the month. | |
| int | GetDay () const |
| Returns the day. | |
| int | GetHour () const |
| Returns the hour. | |
| int | GetMinutes () const |
| Returns the minutes. | |
| int | GetSeconds () const |
| Returns the seconds. | |
| void | AddYears (int nb_yy) |
| Adds years to the current date. | |
| void | AddMonths (int nb_mm) |
| Adds months to the current date. | |
| void | AddDays (int nb_dd) |
| Adds days to the current date. | |
| void | AddHours (int nb_hh) |
| Adds hours to the current date. | |
| void | AddMinutes (int nb_mn) |
| Adds minutes to the current date. | |
| void | AddSeconds (int nb_sc) |
| Adds seconds to the current date. | |
| void | SetYear (int yyyy) |
| Sets the year. | |
| void | SetMonth (int mm) |
| Sets the month. | |
| void | SetDay (int dd) |
| Sets the day. | |
| void | SetHour (int hh) |
| Sets the hour. | |
| void | SetMinutes (int mn) |
| Sets the minutes. | |
| void | SetSeconds (int sc) |
| Sets the seconds. | |
| int | GetDayNumber () const |
| Returns the number of the day in the year (between 0 and 365). | |
| int | GetNumberOfDays () const |
| Returns the number of days in the year before the current day. | |
| int | GetDaysFrom (Date date) const |
| Returns the number of days from a given date. | |
| int | GetNumberOfHours () const |
| Returns the number of hours in the year before the current date. | |
| int | GetNumberOfMinutes () const |
| Returns the number of minutes in the year before the current date. | |
| int | GetNumberOfSeconds () const |
| Returns the number of seconds in the year before the current date. | |
| int | GetWeekDay () const |
| Returns the week day. | |
|
|
Constructor.
|
|
||||||||||||||||||||||||||||
|
Constructor.
|
|
|
Adds days to the current date.
|
|
|
Adds hours to the current date.
|
|
|
Adds minutes to the current date.
|
|
|
Adds months to the current date.
|
|
|
Adds seconds to the current date.
|
|
|
Adds years to the current date.
|
|
||||||||||||||||
|
Returns the date in a given format. 'format' defines the format of the output. Special sequences are y, m, d, h, i, s for the year, the month, the day, the hour, the minutes and the seconds respectively.
|
|
|
Returns the date in a given format. 'format' defines the format of the output. Special sequences are y, m, d, h, i, s for the year, the month, the day, the hour, the minutes and the seconds respectively.
|
|
|
Returns the date in format YYYYMMDD.
|
|
|
Returns the day.
|
|
|
Returns the number of the day in the year (between 0 and 365).
|
|
|
Returns the number of days from a given date.
|
|
|
Returns the hour.
|
|
|
Returns the minutes.
|
|
|
Returns the month.
|
|
|
Returns the number of days in the year before the current day.
|
|
|
Returns the number of hours in the year before the current date.
|
|
|
Returns the number of minutes in the year before the current date.
|
|
|
Returns the number of seconds in the year before the current date.
|
|
|
Returns the seconds.
|
|
|
Returns the week day. Week days are refered as follows:
|
|
|
Returns the year.
|
|
|
Is the current year a leap year?
|
|
|
Is a given year a leap year?
|
|
||||||||||||||||||||||||||||
|
Sets the date.
|
|
|
Sets the date.
|
|
|
Sets the day.
|
|
|
Sets the hour.
|
|
|
Sets the minutes.
|
|
|
Sets the month.
|
|
|
Sets the seconds.
|
|
|
Sets the year.
|
1.3.8