#include <OpenMS/DATASTRUCTURES/Date.h>
This class implements date handling. Import and export to/from both string and integers is possible.
Public Member Functions | |
Date () | |
Default constructor. | |
Date (const Date &date) | |
Copy constructor. | |
Date (const QDate &date) | |
Copy constructor from Qt base class. | |
Date & | operator= (const Date &source) |
Assignment operator. | |
void | set (const String &date) throw (Exception::ParseError) |
sets data from a string | |
void | set (UInt month, UInt day, UInt year) throw (Exception::ParseError) |
sets data from three integers | |
void | today () |
sets the date to today | |
void | get (String &date) const |
Fills the string date with the iso/ansi date. | |
void | get (UInt &month, UInt &day, UInt &year) const |
Fills the arguments with the date. | |
void | clear () |
Sets the undefined date: 00/00/0000. |
Date | ( | ) |
Default constructor.
Fills the object with an undefined date: 00/00/0000
void set | ( | const String & | date | ) | throw (Exception::ParseError) |
sets data from a string
Reads both english, german and iso/ansi date formats: 'mm/dd/yyyy', 'dd.mm.yyyy' or 'yyyy-mm-dd'
void set | ( | UInt | month, | |
UInt | day, | |||
UInt | year | |||
) | throw (Exception::ParseError) |
sets data from three integers
Give the numbers in the following order: month, day and year.
void today | ( | ) |
sets the date to today
void get | ( | String & | date | ) | const |
Fills the string date
with the iso/ansi 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 clear | ( | ) |
Sets the undefined date: 00/00/0000.
Generated Tue Apr 1 15:36:43 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |