35 static const FXchar shortMonthName[12][4];
36 static const FXchar longMonthName[12][10];
37 static const FXchar shortWeekDay[7][4];
38 static const FXchar longWeekDay[7][10];
43 Jan=1,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
48 Sun=0,Mon,Tue,Wed,Thu,Fri,Sat
66 FXDate(FXint yr,FXint mo,FXint dy);
75 void setDate(FXint yr,FXint dy);
78 void getDate(FXint& yr,FXint& dy)
const;
81 void setDate(FXint yr,FXint mo,FXint dy);
84 void getDate(FXint& yr,FXint& mo,FXint& dy)
const;
87 void setTime(FXTime ns);
90 FXTime getTime()
const;
102 FXint dayOfWeek()
const;
105 FXint dayOfYear()
const;
108 FXint weekOfYear()
const;
111 FXbool leapYear()
const;
114 FXint daysInYear()
const;
117 FXint daysInMonth()
const;
123 FXDate& addMonths(FXint m);
126 FXDate& addYears(FXint y);
129 static FXbool leapYear(FXint yr);
132 static FXint daysInYear(FXint yr);
135 static FXint daysInMonth(FXint yr,FXint mo);
138 static const FXchar *
monthName(FXint mo){
return longMonthName[mo-1]; }
144 static const FXchar *
dayName(FXint dy){
return longWeekDay[dy]; }
147 static const FXchar *
dayNameShort(FXint dy){
return shortWeekDay[dy]; }
150 static FXDate localDate();
153 static FXDate universalDate();
160 FXDate& operator-=(FXint x){ julian-=x;
return *
this; }
164 FXDate& operator--(){ --julian;
return *
this; }
172 FXbool operator!=(
const FXDate& date)
const {
return julian!=date.julian;}
176 FXbool operator<=(
const FXDate& date)
const {
return julian<=date.julian;}
177 FXbool operator>(
const FXDate& date)
const {
return julian>date.julian;}
178 FXbool operator>=(
const FXDate& date)
const {
return julian>=date.julian;}
181 friend inline FXDate operator+(
const FXDate& d,FXint x);
182 friend inline FXDate operator+(FXint x,
const FXDate& d);
185 friend inline FXint operator-(
const FXDate& a,
const FXDate& b);
188 friend FXAPI FXStream& operator<<(FXStream& store,
const FXDate& d);
191 friend FXAPI FXStream& operator>>(FXStream& store,FXDate& d);
200 inline FXint operator-(
const FXDate& a,
const FXDate& b){
return a.julian-b.julian; }
void setJulian(FXuint jd)
Set julian day number.
Definition: FXDate.h:69
FXuint getJulian() const
Get julian day number.
Definition: FXDate.h:72
static const FXchar * monthNameShort(FXint mo)
Get the abbreviated name of the month.
Definition: FXDate.h:141
Gregorian date class, which is useful for calendrical calculations.
Definition: FXDate.h:31
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
FXDate operator++(int)
Post-Increment and decrement.
Definition: FXDate.h:167
static const FXchar * monthName(FXint mo)
Get the name of the month.
Definition: FXDate.h:138
FXDate & operator=(const FXDate &date)
Assignment.
Definition: FXDate.h:156
Definition: FX4Splitter.h:28
~FXDate()
Destructor.
Definition: FXDate.h:194
FXDate & operator++()
Pre-Increment and decrement.
Definition: FXDate.h:163
FXDate(const FXDate &date)
Copy constructor.
Definition: FXDate.h:57
FXbool operator<(const FXDate &date) const
Inequality tests.
Definition: FXDate.h:175
static const FXchar * dayName(FXint dy)
Get the name of the day.
Definition: FXDate.h:144
static const FXchar * dayNameShort(FXint dy)
Get the abbreviated name of the day.
Definition: FXDate.h:147
FXDate(FXuint jd)
Initialize with julian day number.
Definition: FXDate.h:60
FXDate & operator+=(FXint x)
Assignment operators.
Definition: FXDate.h:159
FXDate()
Default constructor.
Definition: FXDate.h:54
FXbool operator==(const FXDate &date) const
Equality tests.
Definition: FXDate.h:171