Bayonne2 / Common C++ 2 Framework
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
Date Class Reference

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

#include <numbers.h>

Inheritance diagram for Date:
Inheritance graph
[legend]
Collaboration diagram for Date:
Collaboration graph
[legend]

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 ()
 
virtual ~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
 
String operator() () const
 
Dateoperator++ ()
 
Dateoperator-- ()
 
Dateoperator+= (const long val)
 
Dateoperator-= (const long val)
 
int operator== (const Date &date)
 
int operator!= (const Date &date)
 
int operator< (const Date &date)
 
int operator<= (const Date &date)
 
int operator> (const Date &date)
 
int operator>= (const 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. More...
 

Protected Attributes

long julian
 

Friends

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

Detailed Description

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

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

Author
David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m julian number based date class.

Definition at line 148 of file numbers.h.

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 ( )
virtual Date::~Date ( )
virtual

Member Function Documentation

void Date::fromJulian ( char *  buf) const
protected
char* Date::getDate ( char *  buffer) const
time_t Date::getDate ( void  ) const
time_t Date::getDate ( tm *  buf) 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
Date::operator long ( ) const
inline

Definition at line 188 of file numbers.h.

bool Date::operator! ( ) const
inline

Definition at line 202 of file numbers.h.

int Date::operator!= ( const Date date)
String Date::operator() ( ) const
Date& Date::operator++ ( )
Date& Date::operator+= ( const long  val)
Date& Date::operator-- ( )
Date& Date::operator-= ( const long  val)
int Date::operator< ( const Date date)
int Date::operator<= ( const Date date)
int Date::operator== ( const Date date)
int Date::operator> ( const Date date)
int Date::operator>= ( const 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  )
protectedvirtual

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+ ( const Date date,
const long  val 
)
friend
Date operator+ ( const long  val,
const Date date 
)
friend
Date operator- ( const Date date,
const long  val 
)
friend
Date operator- ( const long  val,
const Date date 
)
friend

Field Documentation

long Date::julian
protected

Definition at line 151 of file numbers.h.


The documentation for this class was generated from the following file: