Klaus Franke wrote:
>
> Hi,
>
> a nice routine, i found in some of our old c-sources:
>
> #define leap_year(yy) ((yy & 3) == 0 ? 1 : 0)
>
> Klaus Franke
???? Seemīs as if you still have not solved your y2k problem.
We are using the following C-code within our date-routines (it is not for the C-purists - but is easy to
read for everyone, who has ever done some coding).
/* == FUNKTIONEN ======================================== */
int sjahr(int nJahr)
{
int nRest = 0;
if ((nRest = nJahr % 4 ) != 0) {
return( FALSE );
}
else {
if (( nRest = nJahr % 100 ) == 0) {
if (( nRest = nJahr % 400 ) == 0) {
return( TRUE );
}
else {
return( FALSE );
}
}
else {
return( TRUE );
}
}
}
Cheers,
friedrich
_________________________________________________________________________________
_/_/_/_/ _/_/_/_/ _/ _/ _/ _/ Oesterreichische Kreditversicherung AG
_/ _/ _/ _/ _/ _/ _/ Friedrich Harasleben
_/ _/ _/_/_/ _/_/ _/ _/ e-mail: [log in to unmask]
_/ _/ _/ _/ _/ _/ _/ fax : +43 1 51554 50 300
_/_/_/_/ _/_/_/_/ _/ _/ _/_/ phone : +43 1 51554 300
_________________________________________________________________________________