Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any function for check if its a leap year ?
Message
 
 
To
22/02/2003 13:42:20
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00756383
Message ID:
00756604
Views:
9
>>>hello all
>>>
>>>is there any function for check if current year its a leap year ?
>>>
>>>txs
>>
>>Here's one-liner that uses VFP date arithmetic.
FUNCTION IsLeapYear(tnYear)
>>RETURN ( (DATE(tnYear,03,01) - DATE(tnYear, 02, 01)) = 29 )
>
>How about:
>
>
>RETURN !empty(date(tnYear, 3, 29))
>
Tere's 31 days in March so your code will always return .T.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform