Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

Date Class Reference
[Datastructures]

#include <OpenMS/DATASTRUCTURES/Date.h>

Inheritance diagram for Date:

QDate

List of all members.


Detailed Description

Date Class.

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.
Dateoperator= (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.


Constructor & Destructor Documentation

Date (  ) 

Default constructor.

Fills the object with an undefined date: 00/00/0000

Date ( const Date date  ) 

Copy constructor.

Date ( const QDate date  ) 

Copy constructor from Qt base class.


Member Function Documentation

Date& operator= ( const Date source  ) 

Assignment operator.

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'

void get ( UInt month,
UInt day,
UInt year 
) const

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.


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:43 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1