36 enum
Month { Jan=0, Feb, Mar, Apr, May, Jun, Jul, Aug,
Sep,
39 static const
char** sFullMonths();
40 static const
char** sAllDaysInMonth();
43 DateInfo(
int usryr,
int usrmnth,
int usrdy);
44 DateInfo(
int usryr,
Month,
int usrdy);
45 DateInfo(
int usryr,const
char* mnth,
int usrdy);
46 DateInfo(const
char*);
51 int day()
const {
return days_ + 1; }
53 int year()
const {
return 1900 + years_; }
54 int usrMonth()
const {
return (
int)months_ + 1; }
62 bool operator <(
const DateInfo&)
const;
63 bool operator <=(
const DateInfo&)
const;
64 bool operator >(
const DateInfo&)
const;
65 bool operator >=(
const DateInfo&)
const;
66 DateInfo& operator +=(
int);
67 DateInfo& operator -=(
int dys ) { *
this += -dys;
return *
this; }
68 friend int operator -(
const DateInfo&,
const DateInfo&);
72 const char* weekDayName()
const;
73 const char*
monthName()
const {
return getMonthString(month());}
74 const char* whenRelative(
const DateInfo* di=0)
const;
75 static const char* fullMonthName(
int);
76 static const char* fullMonthName(
Month);
80 bool fromString(
const char*);
81 bool fromStdDateString(
const char*);
82 bool fromNumString(
const char*,
bool yearfirst);
85 static int daysInMonth(
int yr,
Month);
86 static int daysInYear(
int yr ) {
return yr%4 ? 365 : 366; }
87 static Month usrMonth2Month(
int);
96 void getDaysMonths(
int,
int,
int&,
int&);
105 int key()
const {
return days1900_; }
106 DateInfo(
int the_key);
#define mExpClass(module)
Definition: commondefs.h:160
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:287
static int daysInYear(int yr)
Definition: dateinfo.h:86
friend int operator-(const DateInfo &, const DateInfo &)
Definition: dateinfo.h:129
int operator-(const DateInfo &di1, const DateInfo &di2)
Definition: dateinfo.h:129
int year() const
Definition: dateinfo.h:53
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
int key() const
Definition: dateinfo.h:105
int usrMonth() const
Definition: dateinfo.h:54
Definition: dateinfo.h:34
A date info class.
Definition: dateinfo.h:31
bool operator>(const DateInfo &) const
Definition: dateinfo.h:123
int months_
Definition: dateinfo.h:93
#define mDeclareEnumUtils(enm)
Some utilities surrounding the often needed enum <-> string table.
Definition: enums.h:258
int days_
Definition: dateinfo.h:94
bool operator<=(const DateInfo &) const
Definition: dateinfo.h:120
bool operator<(const DateInfo &) const
Definition: dateinfo.h:117
bool operator==(const DateInfo &) const
Definition: dateinfo.h:111
Month month() const
Definition: dateinfo.h:52
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:62
const char * monthName() const
Definition: dateinfo.h:73
int years_
Definition: dateinfo.h:92
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Definition: dateinfo.h:37
Month
Definition: dateinfo.h:36
T & setUdf(T &u)
Definition: undefval.h:262
DayOfWeek
Definition: dateinfo.h:34
bool isUdf(const T &t)
Definition: undefval.h:243
const char * fullMonthName() const
Definition: dateinfo.h:77
Export_Basic const char * toString(ViewStyle)
Definition: dateinfo.h:36
bool operator!=(const DateInfo &) const
Definition: dateinfo.h:114
int day() const
Definition: dateinfo.h:51
bool operator>=(const DateInfo &) const
Definition: dateinfo.h:126
int days1900_
Definition: dateinfo.h:91