#include <aflibDateTime.h>
Public Member Functions | |
| 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. | |
| ~aflibDateTime () | |
| Destructor. | |
| bool | operator< (const aflibDateTime &date) const |
| Comparision operator. | |
| 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. | |
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 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. |
|
|
Comparision operator. This operator will determine if one date and time is less than another date and time. |
|
||||||||||||
|
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.4.6