User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - OS - Time - DateC
 

  PUBLIC
DateC::DateC(void)
DateC::DateC(bool,bool)
DateC::DateC(RealT)
DateC::DateC(IntT,IntT,IntT,IntT,IntT,IntT,IntT)
DateC::DateC(istream &)
DateC::DateC(long,long)
DateC::DateC(const DateC &)
DateC::DateC(const StringC &)
DateC::IsLeapYear(int)
DateC::YearToDaysSince1970(int)
DateC::IsValid(void) const
DateC::IsZero(void) const
DateC::SetInvalid(void)
DateC::SetToNow(bool)
DateC::MaxUSeconds(void) const
DateC::Resolution(void) const
DateC::NormalisePos(void)
DateC::NormaliseNeg(void)
DateC::operator ==(const DateC &) const
DateC::operator !=(const DateC &) const
DateC::operator >(const DateC &) const
DateC::operator <(const DateC &) const
DateC::operator >=(const DateC &) const
DateC::operator <=(const DateC &) const
DateC::operator +(const DateC &) const
DateC::operator -(const DateC &) const
DateC::operator -=(const DateC &)
DateC::operator -=(double)
DateC::operator +=(const DateC &)
DateC::operator +=(double)
DateC::Text(void) const
DateC::CTime(void) const
DateC::CTimeShort(void) const
DateC::USeconds(void) const
DateC::TotalSeconds(void) const
DateC::Double(void) const
DateC::Seconds(void) const
DateC::Minute(void) const
DateC::Hour(void) const
DateC::Month(void) const
DateC::Year(void) const
DateC::DayInMonth(void) const
DateC::DayInYear(void) const
DateC::DayInWeek(void) const
DateC::TextDayInWeek(void) const
DateC::DaylightSaving(void) const
DateC::Wait(void) const
DateC::Save(ostream &) const

   DateC   
 
Date & Time information.
 
include "Ravl/OS/Date.hh"
Created:07/05/98 
User Level:Normal
Library:RavlOS
In Scope:RavlN

Comments:
SMALL OBJECT. NB. The virtual timer uses the clock() system call. This means virtual timing will only make sense for the first 36 minutes. After that the timer will wrap.

Variables:
Methods:
DateC()
Default constructor.
Sets time to 0.

DateC(bool setval,bool useVirt = false)
Constructor.
If 'setval' is false an invalid date is created. otherwise the date is set to now. if useVirt is true a virtual time is used.

DateC(RealT val)
Construct from a real in seconds.

DateC(IntT year,IntT month,IntT day,IntT hour = 0,IntT min = 0,IntT sec = 0,IntT usec = 0)
Constructer.

DateC(istream & in)
Construct from a stream

DateC(long xsec,long xusec)
Construct from two longs..

DateC(const DateC & val)
Copy constructor

DateC(const StringC &)
String constructor
Expects data in sec:usec format as produced by Text() method.

static bool IsLeapYear(int year)
Is give year a leap year ?

static int YearToDaysSince1970(int year)
Convert year to days since 1970

bool IsValid() const
Is a valid date ?

bool IsZero() const
Is time zero ?

void SetInvalid()
Make this date invalid.

void SetToNow(bool useVirt = false)
Set value of variable to now!

long MaxUSeconds() const
Maximum mircro seconds.

long Resolution() const
Get resolution of timer in microseconds.
NB. This assumes 100Hz by default.

void NormalisePos()
Normalise time representation after addition

void NormaliseNeg()
Normalise time representation after subtraction

bool operator ==(const DateC & oth) const
Compre times.

bool operator !=(const DateC & oth) const
Compare times.

bool operator >(const DateC & oth) const
Compare times.

bool operator <(const DateC & oth) const
Compare times.

bool operator >=(const DateC & oth) const
Compare times.

bool operator <=(const DateC & oth) const
Compare times.

DateC operator +(const DateC & oth) const
Add times.

DateC operator -(const DateC & oth) const
Subtract times.

const DateC & operator -=(const DateC & val)
Inplace subtraction.

const DateC & operator -=(double val)
Inplace subtraction.

const DateC & operator +=(const DateC & val)
Inplace addition.

const DateC & operator +=(double val)
Inplace addition.

StringC Text() const
Get the time in string form.
This currently prints the time in the form sec:usec.

StringC CTime() const
Returns results equivelent to calling ctime().

StringC CTimeShort() const
Returns a short string containing date/time.

long USeconds() const
Get micro seconds.

long TotalSeconds() const
Get total seconds.

double Double() const
Get time in double form.

IntT Seconds() const
Return number of seconds after minuite. 0,61 (61 for leap seconds.)

IntT Minute() const
Get minute.

IntT Hour() const
Hours since midnight. 0-23

IntT Month() const
Get month 1-31

IntT Year() const
Get year.

IntT DayInMonth() const
Get day in month. 1,31

IntT DayInYear() const
Get day of year. 0-365

IntT DayInWeek() const
Get day of week. Since sunday, 0-6

const StringC & TextDayInWeek() const
Get day of week in text form.

bool DaylightSaving() const
Are we daylight saveing ?
True = yes

bool Wait() const
Wait until this time.
this is implemented with the DeadLineTimer.

void Save(ostream & out) const
Write to a stream.


Maintainer:Charles Galambos, Created: 07/05/98, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002