Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any function for check if its a leap year ?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00756383
Message ID:
00757012
Views:
13
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform