Bayonne2 / Common C++ 2 Framework
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+= (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 Datedate )
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 Datedate )
int Date::operator<= ( const Datedate )
int Date::operator== ( const Datedate )
int Date::operator> ( const Datedate )
int Date::operator>= ( const Datedate )
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 Datedate,
const long  val 
)
friend
Date operator+ ( const long  val,
const Datedate 
)
friend
Date operator- ( const Datedate,
const long  val 
)
friend
Date operator- ( const long  val,
const Datedate 
)
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:

Generated on Dec 21, 2017 for commoncpp2-1.8.1, ccrtp-1.7.2, libzrtpcpp-2.3.4, ccscript3-1.1.7, ccaudio2-1.0.0 and bayonne2-2.3.2 (after installation in /usr/local/) by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /