home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c100 / 5.ddi / DATECL.ZIP / DATE.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-28  |  710 b   |  43 lines

  1. // -------- Date Functions
  2.  
  3. #ifndef DATE
  4. #define DATE
  5.  
  6.  
  7. class Date
  8. /*  dos_date_t */
  9. {
  10.     char da_day;
  11.     char da_mon;
  12.     int  da_year;
  13.     char da_dayofweek;
  14.  
  15. public:
  16.  
  17.     Date(void);
  18.     Date(int, int, int);
  19.     Date(Date& adate);
  20.     ~Date(void) {; };
  21.  
  22.     void readdate(void);
  23.     void printdate(void);
  24.     long numberdays(void);
  25.     int operator-(Date& adate);
  26.     Date operator+(Date& adate);
  27.     void daytodate(long days);
  28.     int isleap(void) { return ( !(da_year % 4) || !(da_year % 400)  ); };
  29.     Date addday(long days);
  30.     int month(void) { return(da_mon); };
  31.     int year(void)  { return(da_year); };
  32.     int day(void)   { return(da_day); };
  33.  
  34.  
  35.     
  36.     
  37. };
  38.  
  39. int daysbetween( Date& Date1, Date& Date2 ); 
  40.  
  41. #endif
  42.  
  43.