Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

Date Class Reference

The Date class uses a julian date representation of the current year, month, and day. julian number based date class. More...

#include <numbers.h>

Inheritance diagram for Date:

DateNumber Datetime List of all members.

Public Member Functions

 Date (time_t tm)
 Date (tm *dt)
 Date (char *str, size_t size=0)
 Date (int year, unsigned month, unsigned day)
 Date ()
int getYear (void) const
unsigned getMonth (void) const
unsigned getDay (void) const
unsigned getDayOfWeek (void) const
char * getDate (char *buffer) const
time_t getDate (void) const
time_t getDate (tm *buf) const
long getValue (void) const
void setDate (const char *str, size_t size=0)
bool isValid (void) const
 operator long () const
std::string operator() () const
Dateoperator++ ()
Dateoperator-- ()
Dateoperator+= (long val)
Dateoperator-= (long val)
int operator== (Date &date)
int operator!= (Date &date)
int operator< (Date &date)
int operator<= (Date &date)
int operator> (Date &date)
int operator>= (Date &date)
bool operator! () const

Protected Member Functions

void toJulian (long year, long month, long day)
void fromJulian (char *buf) const
virtual void update (void)
 A method to use to "post" any changed values when shadowing a mixed object class.


Protected Attributes

long julian

Friends

Date operator+ (Date &date, long val)
Date operator- (Date &date, long val)
Date operator+ (long val, Date &date)
Date operator- (long val, Date &date)

Detailed Description

The Date class uses a julian date representation of the current year, month, and day. julian number based date class.

This is then manipulated in several forms and may be exported as needed.

Author:
David Sugar <dyfet@ostel.com>


Constructor & Destructor Documentation

Date::Date time_t  tm  ) 
 

Date::Date tm *  dt  ) 
 

Date::Date char *  str,
size_t  size = 0
 

Date::Date int  year,
unsigned  month,
unsigned  day
 

Date::Date  ) 
 


Member Function Documentation

void Date::fromJulian char *  buf  )  const [protected]
 

time_t Date::getDate tm *  buf  )  const
 

time_t Date::getDate void   )  const
 

char* Date::getDate char *  buffer  )  const
 

unsigned Date::getDay void   )  const
 

unsigned Date::getDayOfWeek void   )  const
 

unsigned Date::getMonth void   )  const
 

long Date::getValue void   )  const
 

int Date::getYear void   )  const
 

bool Date::isValid void   )  const
 

Reimplemented in Datetime.

Date::operator long  )  const [inline]
 

bool Date::operator! void   )  const [inline]
 

int Date::operator!= Date date  ) 
 

std::string Date::operator()  )  const
 

Date& Date::operator++  ) 
 

Date& Date::operator+= long  val  ) 
 

Date& Date::operator--  ) 
 

Date& Date::operator-= long  val  ) 
 

int Date::operator< Date date  ) 
 

int Date::operator<= Date date  ) 
 

int Date::operator== Date date  ) 
 

int Date::operator> Date date  ) 
 

int Date::operator>= Date date  ) 
 

void Date::setDate const char *  str,
size_t  size = 0
 

void Date::toJulian long  year,
long  month,
long  day
[protected]
 

virtual void Date::update void   )  [inline, protected, virtual]
 

A method to use to "post" any changed values when shadowing a mixed object class.

This is used by DateNumber.

Reimplemented in DateNumber.


Friends And Related Function Documentation

Date operator+ long  val,
Date date
[friend]
 

Date operator+ Date date,
long  val
[friend]
 

Date operator- long  val,
Date date
[friend]
 

Date operator- Date date,
long  val
[friend]
 


Member Data Documentation

long Date::julian [protected]
 


The documentation for this class was generated from the following file:
Generated on Thu Sep 25 13:14:32 2003 for GNU CommonC++ by doxygen 1.3.3