>>>How do I define a leap year?? I know that year % 4 returning a 0 is not enough. What's the rest??
>>>
>>>Thanks
>>Sandy,
>>
>>Since everyone's giving you function ideas, here's mine:
>>* ldtdate is a DATE or DATETIME
>>lnyear = YEAR(ldtdate)
>>llisleap = (lnyear % 4 = 0) AND ((lnyear % 100 # 0) OR (lnyear % 400 = 0))
>
>
>And here is mine:
>
> function LeapYear(tnYear)
> return (tnYear % 4) = 0
>
>Good for the last 97 and the next 101 years...
>
>(which brings us full circle to Sandy's original
>concept.)
>
>Bet that outlasts FoxPro!
>
>Peter Robinson :-)
Even though the useful "lifetime" of any particular piece of software is probably getting shorter and shorter before it's replaced, this is exactly the kind of thinking that gave us the "Y2K" problem to begin with! Who REALLY KNOWS if that will "outlast FoxPro" or not??? ;-) But also, who really knows if our current calendar will still be in use that far in the future?!?!
It's just a roll of the dice...