date_isleapyr()

Determines if the specified year is a leap year

Call  
#include <vv_sys.h>
int date_isleapyr(year)

int year

Year to be checked

Returns
1 The specified year is a leap year
0 The specified year is not a leap year
Description

date_isleapyr() determines if the year is a leap year. If the year is less than 100, it is assumed to be a two-digit representation of the year (i.e., 92 for 1992) and is adjusted accordingly by the global variable CENTURYBREAK.

This function makes the following determinations:

  • If the year is divisible by 4 and not divisible by 100, it is a leap year.

  • If the year is divisible by 4, 100, and 400, it is a leap year.


Home Contents Previous Next