home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_11_02
/
1102126b
< prev
next >
Wrap
Text File
|
1992-12-10
|
475b
|
31 lines
// date2.cpp
#include "date2.h"
inline int isleap(int y)
{return y%4 == 0 && y%100 != 0 || y%400 == 0;}
static int Dtab [2][13] =
{
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
};
Date * Date::interval(const Date& d2)
{
(same as in Listing 2)
}
Date::Date()
{
month = day = year = 0;
}
Date::Date(int m, int d, int y)
{
month = m;
day = d;
year = y;
}