Closed capitainekurck closed 1 year ago
Hello,
I m not a C guru but it seem that to find a leap year you divide the year by 4. you must also consider dividing by 100 and 400. There is an explanation here: https://learn.microsoft.com/en-us/office/troubleshoot/excel/determine-a-leap-year or here but it mid french mid english https://fr.wikihow.com/calculer-les-ann%C3%A9es-bissextiles regard
That is correct, the original formula was incomplete, it has now been fixed to read
if (m > 2 && (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)))
Change implemented in source
Fixed
Hello,
I m not a C guru but it seem that to find a leap year you divide the year by 4. you must also consider dividing by 100 and 400. There is an explanation here: https://learn.microsoft.com/en-us/office/troubleshoot/excel/determine-a-leap-year or here but it mid french mid english https://fr.wikihow.com/calculer-les-ann%C3%A9es-bissextiles regard