MySQLaux 0.6 is free software from Langensoft written by Thomas Langen.

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

MySQLaux/Date.h File Reference

#include "Exception.h"
#include <string>
#include <sstream>

Include dependency graph for Date.h:

Include dependency graph

Go to the source code of this file.

Namespaces

namespace  MySQLaux

Functions

bool operator< (MySQLaux::Date const &date1, MySQLaux::Date const &date2) throw (MySQLaux::InvalidDate)
 Comparisons. More...

bool operator== (MySQLaux::Date const &date1, MySQLaux::Date const &date2) throw (MySQLaux::InvalidDate)
bool operator<= (MySQLaux::Date const &date1, MySQLaux::Date const &date2) throw (MySQLaux::InvalidDate)
bool operator!= (MySQLaux::Date const &date1, MySQLaux::Date const &date2) throw (MySQLaux::InvalidDate)
bool operator> (MySQLaux::Date const &date1, MySQLaux::Date const &date2) throw (MySQLaux::InvalidDate)
bool operator>= (MySQLaux::Date const &date1, MySQLaux::Date const &date2) throw (MySQLaux::InvalidDate)
std::ostream& operator<< (std::ostream &os, MySQLaux::Date const &date) throw (MySQLaux::InvalidDate)
 Date output. More...

std::istringstream& operator>> (std::istringstream &is, MySQLaux::Date &date) throw (MySQLaux::InvalidDate)
 Input operator for Date. More...


Function Documentation

bool operator!= ( MySQLaux::Date const & date1,
MySQLaux::Date const & date2 ) throw (MySQLaux::InvalidDate) [inline]
 

Definition at line 137 of file Date.h.

00140 {
00141   return (!(date1 == date2));
00142 

bool operator< ( MySQLaux::Date const & date1,
MySQLaux::Date const & date2 ) throw (MySQLaux::InvalidDate)
 

Comparisons.

std::ostream & operator<< ( std::ostream & os,
MySQLaux::Date const & date ) throw (MySQLaux::InvalidDate)
 

Date output.

The format is "European explicit style", e.g. 11 April 1964. Currently no checking on valid date.

bool operator<= ( MySQLaux::Date const & date1,
MySQLaux::Date const & date2 ) throw (MySQLaux::InvalidDate) [inline]
 

Definition at line 130 of file Date.h.

00133 {
00134   return (date1 < date2 || date1 == date2);
00135 

bool operator== ( MySQLaux::Date const & date1,
MySQLaux::Date const & date2 ) throw (MySQLaux::InvalidDate)
 

bool operator> ( MySQLaux::Date const & date1,
MySQLaux::Date const & date2 ) throw (MySQLaux::InvalidDate) [inline]
 

Definition at line 144 of file Date.h.

00147 {
00148   return (!(date1 < date2) && !(date1 == date2));
00149 

bool operator>= ( MySQLaux::Date const & date1,
MySQLaux::Date const & date2 ) throw (MySQLaux::InvalidDate) [inline]
 

Definition at line 151 of file Date.h.

00154 {
00155   return (!(date1 < date2));
00156 

std::istringstream & operator>> ( std::istringstream & is,
MySQLaux::Date & date ) throw (MySQLaux::InvalidDate)
 

Input operator for Date.

MySQL retrieves and displays DATE values in 'YYYY-MM-DD' format. The supported range is '1000-01-01' to '9999-12-31'.

Exceptions:
InvalidDate   the input does not fit totally to the required format


Generated at Fri Apr 6 11:20:04 2001 for MySQLaux by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001