Return the number of leap years between year1 and year2 inclusive.
Synopsis
Declared in <bdlt_posixdateimputil.h>
static
int
numLeapYears(
int year1,
int year2);
Description
Return the number of leap years occurring between the specified year1 and year2 (inclusive). The behavior is undefined unless 1 <= year1 <= 9999, 1 <= year2 <= 9999, and year1 <= year2.
Return Value
count of leap years in the closed range
Parameters
Name |
Description |
year1 |
inclusive lower bound year |
year2 |
inclusive upper bound year |
Created with MrDocs