7#if !defined(OWL_DATE_H)
11#if defined(BI_HAS_PRAGMA_ONCE)
37static const JulTy jul1901 = 2415386L;
86 int CompareTo(
const TDate& )
const;
89 DayTy DayOfMonth()
const;
90 DayTy FirstDayOfMonth()
const;
92 unsigned Hash()
const;
140 static HowToPrint SetPrintOption( HowToPrint
h );
158 static const tchar* GetIntlName(TDateType
type,
int index);
162 static int AssertWeekDayNumber(
DayTy d );
163 static int AssertIndexOfMonth(
MonthTy m );
168 static HowToPrint PrintOption;
191 ParseFrom(
const_cast<tistream&
>(s));
202 return Julnum >=
d1.Julnum && Julnum <=
d2.Julnum;
238 return Julnum < date.Julnum;
244 return Julnum <= date.Julnum;
250 return Julnum > date.Julnum;
256 return Julnum >= date.Julnum;
262 return Julnum == date.Julnum;
268 return Julnum != date.Julnum;
274 return Julnum -
dt.Julnum;
310 return m>=1 &&
m<=12;
The TDate class represents a date.
YearTy Year() const
Returns the year of this TDate.
static int LeapYear(YearTy year)
LPCTSTR NameOfMonth() const
Returns this TDate's month string name.
int Between(const TDate &d1, const TDate &d2) const
Returns 1 if this TDate object is between d1 and d2, inclusive.
void operator--()
Decrements this TDate by 1.
int IsValid() const
Returns 1 if this TDate is valid, 0 otherwise.
TDate()
Construct a TDate with the current date.
static LPCTSTR MonthName(MonthTy monthNumber)
Returns the string name for the given monthNumber (1-12).
static int AssertIndexOfMonth(MonthTy m)
Returns 1 if m is between 1 and 12 inclusive, otherwise returns 0.
int operator==(const TDate &date) const
Returns 1 if this TDate is equal to date, otherwise returns 0.
int Leap() const
leap year?
void operator-=(int dd)
Subtracts dd from this TDate.
void operator++()
Increments this TDate by 1.
int operator>=(const TDate &date) const
Returns 1 if this TDate is greater than or equal to date, otherwise returns 0.
TDate(const tstring &s, const tstring &format)
static int AssertWeekDayNumber(DayTy d)
Returns 1 if d is between 1 and 7 inclusive, otherwise returns 0.
static LPCTSTR DayName(DayTy weekDayNumber)
Returns a string name for the weekday number.
DayTy FirstDayOfMonth() const
Returns the number of the first day of the month for this TDate.
void operator+=(int dd)
Adds dd to this TDate.
int operator<(const TDate &date) const
Returns 1 if this TDate precedes date. Otherwise returns 0.
friend TDate operator-(const TDate &dt, int dd)
MonthTy Month() const
Returns the month of this TDate.
HowToPrint
Lists different print formats.
int operator<=(const TDate &date) const
Returns 1 if this TDate is less than or equal to date, otherwise returns 0.
int operator!=(const TDate &date) const
Returns 1 if this TDate is not equal to date, otherwise returns 0.
DayTy WeekDay(DayTy day=0) const
Returns 1 (Monday) through 7 (Sunday).
LPCTSTR NameOfDay() const
Returns this TDate's day string name.
int operator>(const TDate &date) const
Returns 1 if this TDate is greater than date. otherwise returns 0.
TSystemTime is a class derived from the structure SYSTEMTIME.
The TTime class encapsulates time functions and characteristics.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Base class for writing streamable objects.
Object Windows Library (OWLNext Core)
unsigned YearTy
Year type.
unsigned long JulTy
Julian calendar type.
unsigned HashValue(TDate &d)
unsigned MonthTy
Month type.
General definitions used by all ObjectWindows programs.
#define _OWLSTATICFUNC(p)