Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any function for check if its a leap year ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00756383
Message ID:
00757012
Vues:
20
or...
Function LeapinLizards
lpar pYear
return day(date(pYear,3,1)-1) = 29
I am amazed how many cats with fur are around when there are SOO many ways to skin a cat!

Glenn

>>Jim it returns .T. for all the years ????
>>
>>
>>>Akhan,
>>>
>>>Here's a UDF that skips the math stuff;
>>>
>>>
>>>PROCEDURE IsLeapYear(tnYear)
>>>
>>>RETURN MONTH(DATE(tnYear,2,27) + 1 ) = 2
>>>
>
>Jim made a correction to his formula. It should be 28 instead of 27.
>RETURN MONTH(DATE(tnYear,2,28) + 1 ) = 2
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform