00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef INCL_BASIC_TIME
00019 #define INCL_BASIC_TIME
00020
00022 #include "base/fscapi.h"
00023 #include "base/util/ArrayElement.h"
00024
00025 class BasicTime : public ArrayElement {
00026
00027
00028 private:
00029
00030 int year;
00031 int month;
00032 int day;
00033 int weekday;
00034 int hour;
00035 int min;
00036 int sec;
00037
00038 int tzHour;
00039 int tzMin;
00040
00041 public:
00042
00043
00044 BasicTime();
00045
00046
00047 int getYear() const { return year; }
00048 void setYear(int v) { year=v; }
00049
00050 int getMonth() const { return month; }
00051 void setMonth(int v) { month=v; }
00052
00053 int getDay() const { return day; }
00054 void setDay(int v) { day=v; }
00055
00056 int getWeekday() const { return weekday; }
00057 void setWeekday(int v) { weekday=v; }
00058
00059 int getHour() const { return hour; }
00060 void setHour(int v) { hour=v; }
00061
00062 int getMin() const { return min; }
00063 void setMin(int v) { min=v; }
00064
00065 int getSec() const { return sec; }
00066 void setSec(int v) { sec=v; }
00067
00068 int getTzHour() const { return tzHour; }
00069 void setTzHour(int v) { tzHour=v; }
00070
00071 int getTzMin() const { return tzMin; }
00072 void setTzMin(int v) { tzMin=v; }
00073
00074
00075
00076 int set(int yy, int mon, int dd, int wd,
00077 int hh, int mm, int ss, int tzh, int tzm);
00078
00079 int parseRfc822(const char *date);
00080 char *formatRfc822() const ;
00081 bool isADate(const char* date);
00082 ArrayElement *clone();
00083
00084 BasicTime& operator=(const BasicTime& d);
00085 bool operator==(const BasicTime& d) const;
00086 bool operator!=(const BasicTime& d) const { return !(*this == d); }
00087
00088
00089 };
00091 #endif