Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
After January 1st
Message
De
04/01/2000 04:07:26
Walter Meester
HoogkarspelPays-Bas
 
 
À
04/01/2000 03:42:21
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00308678
Message ID:
00312210
Vues:
55
Fred,

>>The year is divisable by 4 except for the century years which are not divisable by 4.
>>
>>(20 mod 4 = 0) --> leap year
>>(19 mod 4 = 3) --> not a leap year
>>
>>Walter,
>
>You must include the 100 & 400 checks. 2100, 2200, 2300 will NOT be leap years, but 2400 will be.

I did: the exception was for century years the century was not divisable by 4 (thus years not divisable by 400), though I must say I could have been more clear.

So:

Leapyear = MOD(nYear,4)=0 AND (MOD(nYear,100) # 0 OR MOD(nYear,400)=0)

Walter,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform