Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXDate Class Reference

Gregorian date object. More...

#include <FXDate.h>

List of all members.

Public Types

enum  {
  Sun = 0,
  Mon,
  Tue,
  Wed,
  Thu,
  Fri,
  Sat
}

Public Member Functions

 FXDate ()
 FXDate (const FXDate &date)
 FXDate (FXint y, FXint m, FXint d)
 FXDate (FXuint j)
void setJulian (FXuint day)
FXuint getJulian () const
void setDate (FXint y, FXint m, FXint d)
void getDate (FXint &y, FXint &m, FXint &d) const
FXint day () const
FXint month () const
FXint year () const
FXint dayOfWeek () const
FXint dayOfYear () const
FXint daysInMonth () const
bool leapYear () const
FXDate & operator= (const FXDate &date)
FXDate & operator+= (FXint x)
FXDate & operator-= (FXint x)
FXDate & operator++ ()
FXDate & operator-- ()
bool operator== (const FXDate &date) const
bool operator!= (const FXDate &date) const
bool operator< (const FXDate &date) const
bool operator<= (const FXDate &date) const
bool operator> (const FXDate &date) const
bool operator>= (const FXDate &date) const

Static Public Member Functions

static bool leapYear (FXint y)
static const FXchar * monthName (FXint month)
static const FXchar * monthNameShort (FXint month)
static const FXchar * dayName (FXint day)
static const FXchar * dayNameShort (FXint day)
static FXDate localDate ()
static FXDate zuluDate ()

Friends

FXDate operator+ (const FXDate &d, FXint x)
FXDate operator+ (FXint x, const FXDate &d)
FXint operator- (const FXDate &a, const FXDate &b)
FXStream & operator<< (FXStream &store, const FXDate &d)
FXStream & operator>> (FXStream &store, FXDate &d)


Detailed Description

Gregorian date object.


Member Enumeration Documentation

anonymous enum
 

Names for the weekdays.

Enumeration values:
Sun 
Mon 
Tue 
Wed 
Thu 
Fri 
Sat 


Constructor & Destructor Documentation

FX::FXDate::FXDate (   )  [inline]
 

Default constructor.

FX::FXDate::FXDate (  const FXDate &  date  )  [inline]
 

Copy constructor.

FX::FXDate::FXDate (  FXint  y,
FXint  m,
FXint  d
) 
 

Initialize with year, month, and day.

FX::FXDate::FXDate (  FXuint  j  )  [inline]
 

Initialize with julian day number.


Member Function Documentation

void FX::FXDate::setJulian (  FXuint  day  )  [inline]
 

Set julian day number.

FXuint FX::FXDate::getJulian (   )  const [inline]
 

Get julian day number.

void FX::FXDate::setDate (  FXint  y,
FXint  m,
FXint  d
) 
 

Set to year, month, and day.

void FX::FXDate::getDate (  FXint &  y,
FXint &  m,
FXint &  d
)  const
 

Get year, month, and day.

FXint FX::FXDate::day (   )  const
 

Return day of the month.

FXint FX::FXDate::month (   )  const
 

Return month.

FXint FX::FXDate::year (   )  const
 

Return year.

FXint FX::FXDate::dayOfWeek (   )  const
 

Return day of the week.

FXint FX::FXDate::dayOfYear (   )  const
 

Return day of year.

FXint FX::FXDate::daysInMonth (   )  const
 

Return days in this month.

bool FX::FXDate::leapYear (   )  const
 

Return true if leap year.

static bool FX::FXDate::leapYear (  FXint  y  )  [static]
 

Is the value a leap year.

static const FXchar* FX::FXDate::monthName (  FXint  month  )  [inline, static]
 

Get the name of the month.

static const FXchar* FX::FXDate::monthNameShort (  FXint  month  )  [inline, static]
 

Get the abbreviated name of the month.

static const FXchar* FX::FXDate::dayName (  FXint  day  )  [inline, static]
 

Get the name of the day.

static const FXchar* FX::FXDate::dayNameShort (  FXint  day  )  [inline, static]
 

Get the abbreviated name of the day.

static FXDate FX::FXDate::localDate (   )  [static]
 

Return current local date.

static FXDate FX::FXDate::zuluDate (   )  [static]
 

Return current UTC (Zulu) date.

FXDate& FX::FXDate::operator= (  const FXDate &  date  )  [inline]
 

Assignment.

FXDate& FX::FXDate::operator+= (  FXint  x  )  [inline]
 

Assignment operators.

FXDate& FX::FXDate::operator-= (  FXint  x  )  [inline]
 

FXDate& FX::FXDate::operator++ (   )  [inline]
 

Increment and decrement.

FXDate& FX::FXDate::operator-- (   )  [inline]
 

bool FX::FXDate::operator== (  const FXDate &  date  )  const [inline]
 

Equality tests.

bool FX::FXDate::operator!= (  const FXDate &  date  )  const [inline]
 

bool FX::FXDate::operator< (  const FXDate &  date  )  const [inline]
 

Inequality tests.

bool FX::FXDate::operator<= (  const FXDate &  date  )  const [inline]
 

bool FX::FXDate::operator> (  const FXDate &  date  )  const [inline]
 

bool FX::FXDate::operator>= (  const FXDate &  date  )  const [inline]
 


Friends And Related Function Documentation

FXDate operator+ (  const FXDate &  d,
FXint  x
)  [friend]
 

Add days to date yielding another date.

FXDate operator+ (  FXint  x,
const FXDate &  d
)  [friend]
 

FXint operator- (  const FXDate &  a,
const FXDate &  b
)  [friend]
 

Substract dates yielding days.

FXStream& operator<< (  FXStream &  store,
const FXDate &  d
)  [friend]
 

save to stream

FXStream& operator>> (  FXStream &  store,
FXDate &  d
)  [friend]
 

load from stream

Copyright © 1997-2005 Jeroen van der Zijp