Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
After January 1st
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00308678
Message ID:
00312092
Vues:
43
I knew it was something like that...

Thanks...

>Good, except the first divisor should be 4 < g >
>
>do case
>case mod(nYear, 400) = 0
>  lLeapYear = .t.
>case mod(nYear, 100) = 0
>  lLeapYear = .f.
>case mod(nYear, 4) = 0
>  lLeapYear = .t.
>otherwise
>  lLeapYear = .f.
>endcase
>
>Cheers,
>
>Andrew
>
>>Hold the phone... I think I am missing something...
>>
>>Maybe it is this:
>>
>>If a year is divisble by 10, it can be a leap year
>>If that same year is divisible by 100, it is not a leap year...
>>However, if that same year is then divisble by 400, it is then a leap year...
>>
>>Yea... that is the ticket...
>>
>>It makes for an interesting math equation....
>>
>>
>>
>>
>>>Jimmy...
>>>
>>>What is the rule???
>>>The year has to be divisible by 10 and 400...right...to be a leap year..
>>>
>>>lLeapYear = Mod(nyear,0) = 0 And Mod(nyear,400) = 0
>>>
>>>Every 400 years, we have to count an extra day.... Go figure...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform