#include <aflibDateTime.h>
Public Methods | |
| aflibDateTime () | |
| Constructor with no parameters. | |
| aflibDateTime (int year, int month, int day, int hour, int minute, int second) | |
| Constructor with parameters as integer values. | |
| aflibDateTime (string date, string time) | |
| Constructor with parameters as strings. More... | |
| ~aflibDateTime () | |
| Destructor. | |
| bool | operator< (const aflibDateTime &date) const |
| Comparision operator. More... | |
| bool | operator<= (const aflibDateTime &date) const |
| bool | operator== (const aflibDateTime &date) const |
| void | setYear (int year) |
| Sets the year. | |
| int | getYear () const |
| Gets the year. | |
| void | setMonth (int month) |
| Sets the month. | |
| int | getMonth () const |
| Gets the month. | |
| void | setDay (int day) |
| Sets the day. | |
| int | getDay () const |
| Gets the day. | |
| void | setHour (int hour) |
| Sets the hour. | |
| int | getHour () const |
| Gets the hour. | |
| void | setMinute (int minute) |
| Sets the minute. | |
| int | getMinute () const |
| Gets the minute. | |
| void | setSecond (int second) |
| Sets the second. | |
| int | getSecond () const |
| Gets the second. | |
| void | setCurrentTime () |
| Sets the date and time to the current date and time. | |
Friends | |
| ostream& | operator<< (ostream &o, const aflibDateTime &date) |
| Outputs data and time to a stream. More... | |
This class simply holds a date and time. It can be used by other classes such as the aflibAudioRecorder class that requires a date and time. It provides for storing a date and time, printing a date and time, and comparing two dates and times.
|
|
Constructor with no parameters.
|
|
|
Constructor with parameters as integer values.
|
|
|
Constructor with parameters as strings. This constructor takes a date and a time as a string. The date must be in the format MM/DD/YYYY. The time must be in the format HH:MM:SS. |
|
|
Destructor.
|
|
|
Gets the day.
|
|
|
Gets the hour.
|
|
|
Gets the minute.
|
|
|
Gets the month.
|
|
|
Gets the second.
|
|
|
Gets the year.
|
|
|
Comparision operator. This operator will determine if one date and time is less than another date and time. |
|
|
|
|
|
|
|
|
Sets the date and time to the current date and time.
|
|
|
Sets the day.
|
|
|
Sets the hour.
|
|
|
Sets the minute.
|
|
|
Sets the month.
|
|
|
Sets the second.
|
|
|
Sets the year.
|
|
|
Outputs data and time to a stream. This will output the date and time to a stream in the format MM/DD/YYYY and HH:MM:SS. |
1.2.6 written by Dimitri van Heesch,
© 1997-2001