#include <OpenMS/DATASTRUCTURES/Date.h>
Public Member Functions | |
| Date () | |
| Default constructor. More... | |
| Date (const Date &date) | |
| Copy constructor. More... | |
| Date (const QDate &date) | |
| Copy constructor from Qt base class. More... | |
| Date & | operator= (const Date &source) |
| Assignment operator. More... | |
| void | set (const String &date) |
| sets data from a string More... | |
| void | set (UInt month, UInt day, UInt year) |
| sets data from three integers More... | |
| String | get () const |
| Returns a string representation of the date. More... | |
| void | get (UInt &month, UInt &day, UInt &year) const |
| Fills the arguments with the date. More... | |
| void | clear () |
| Sets the undefined date: 00/00/0000. More... | |
Static Public Member Functions | |
| static Date | today () |
| Returns the current date. More... | |
Date Class.
This class implements date handling. Import and export to/from both string and integers is possible.
| Date | ( | ) |
Default constructor.
Fills the object with an undefined date: 00/00/0000
| void clear | ( | ) |
Sets the undefined date: 00/00/0000.
| String get | ( | ) | const |
Returns a string representation of the date.
Uses the iso/ansi date format: 'yyyy-mm-dd'
Fills the arguments with the date.
Give the numbers in the following order: month, day and year.
| void set | ( | const String & | date | ) |
sets data from a string
The following date formats are supoported:
| Exception::ParseError | is thrown if the date is given in the wrong format |
sets data from three integers
| Exception::ParseError | is thrown if an invalid date is given |
|
static |
Returns the current date.
| OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:29 using doxygen 1.8.5 |