Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Leap Year 2000
Message
 
À
09/11/1998 12:44:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00144938
Message ID:
00155813
Vues:
30
>>BOb
>That's because "normal" century years are not leap years -- otherwise we'd get ahead of ourselves. Presumably a millenium year is a leap year (I wasn't around for the last one so I don't remember if it was or not)
>
>I think we should just pick up the planet and move it slightly so that its orbit corresponds to an exact (& non-prime) number of days. Then we could have a calendar that made sense.
>
>Jen

Jen,

Just to add to your trivia collection, a year is a leap year if ...

1. It is evenly divisible by 400

2. It is not evenly divisible by 100 and it is evenly divisible by 4

So, for example;
* IsLeap
LPARAMETERS pnYear
LOCAL llLeap
llLeap = (pnYear%400 = 0)
IF NOT llLeap
   llLeap = (pnYear%100<>0) AND (pnYear%4=0)
ENDIF
RETURN llLeap
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform