home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
xbase
/
library
/
clipper
/
rettig
/
source
/
isleap.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-21
|
614b
|
32 lines
/*********
* Function: ISLEAP
* By: Tom Rettig
* Modified by: Leonard Zerman
* Placed in the public domain by Tom Rettig Associates, 10/22/1990.
*
* Syntax: ISLEAP( <date> / <year> )
* Return: True if <date> or <year> is a leap year, otherwise False
********/
#include "trlib.h"
TRTYPE isleap()
{
char *ds;
int year;
if ( PCOUNT == 1 )
{
if ( ISDATE(1) )
{
ds = _pards(1);
year = DSYEAR(ds);
_retl( ISLPYR(year) );
}
else
if ( ISNUM(1) )
_retl( ISLPYR(_parni(1)) );
}
else
_retl( FALSE );
}