Historical updating oE is_leap_year, Revision 1

is_leap_year

include datetime.e 
namespace datetime 
public function is_leap_year(datetime dt) 

determines if dt falls within leap year.

Parameters:
  1. dt : a datetime to be queried.
Returns:

An integer, of 1 if leap year, otherwise 0.

Example 1:
d = new(2008, 1, 1, 0, 0, 0) 
? is_leap_year(d) -- prints 1 
d = new(2005, 1, 1, 0, 0, 0) 
? is_leap_year(d) -- prints 0 
See Also:

days_in_month

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu