Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Leap years
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00115008
Message ID:
00115020
Vues:
18
>Hello All,
>A simple question but one I have gone completelty blank on.
>
>How do I define a leap year?? I know that year % 4 returning a 0 is not enough. What's the rest??
>
>Thanks

Here's a quick and dirty function for determining leap years:

Function LeapYear
* dCheck_date is some date in the year you wish to check
Parameters dCheck_date
local nYear
m.nYear = STR(YEAR(m.dCheck_date),4)
return !empty(CTOD("02/29/"+m.nYear))
Later...
/< /-/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform