08-27-2009, 09:20 PM
|
#5 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,298
Thanks: 17
|
I figured it was lost in translation once I saw you were from Portugal, but I put it though bablefish....
This will tell you if its leap year (the year that has 366 days in it)
PHP Code:
function isLeapYear(int year) { if(year % 4 == 0) { return true; } else { return false; } }
Basically what the code does is use the modulo operator to see if the year can be divided by four without any remainder. If it can be divided by four, its leap year.
|
|
|
|