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

ost::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 ost::Date:

ost::DateNumber ost::Datetime List of all members.

Public Methods

 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)
unsigned getMonth (void)
unsigned getDay (void)
unsigned getDayOfWeek (void)
char * getDate (char *buffer)
time_t getDate (void)
long getValue (void)
tm * getDate (tm *buf)
void setDate (char *str, size_t size=0)
bool isValid (void)
 operator long ()
std::string operator() ()
Date & operator++ ()
Date & operator-- ()
Date & operator+= (long val)
Date & operator-= (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! ()

Protected Methods

void toJulian (long year, long month, long day)
void fromJulian (char *buf)
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

ost::Date::Date time_t    tm
 

ost::Date::Date tm *    dt
 

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

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

ost::Date::Date  
 


Member Function Documentation

void ost::Date::fromJulian char *    buf [protected]
 

tm* ost::Date::getDate tm *    buf
 

time_t ost::Date::getDate void   
 

char* ost::Date::getDate char *    buffer
 

unsigned ost::Date::getDay void   
 

unsigned ost::Date::getDayOfWeek void   
 

unsigned ost::Date::getMonth void   
 

long ost::Date::getValue void   
 

int ost::Date::getYear void   
 

bool ost::Date::isValid void   
 

Reimplemented in ost::Datetime.

ost::Date::operator long   [inline]
 

bool ost::Date::operator! void    [inline]
 

int ost::Date::operator!= Date &    date
 

std::string ost::Date::operator()  
 

Date& ost::Date::operator++  
 

Date& ost::Date::operator+= long    val
 

Date& ost::Date::operator--  
 

Date& ost::Date::operator-= long    val
 

int ost::Date::operator< Date &    date
 

int ost::Date::operator<= Date &    date
 

int ost::Date::operator== Date &    date
 

int ost::Date::operator> Date &    date
 

int ost::Date::operator>= Date &    date
 

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

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

virtual void ost::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 ost::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 ost::Date::julian [protected]
 


The documentation for this class was generated from the following file:
Generated on Thu Nov 21 12:28:32 2002 for GNU CommonC++ by doxygen1.2.18