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:
00756412
Views:
12
>George
>
>
lIsLeapYr = (nyear % 4 = 0) AND (nyear % 400 = 0)
>
>it works for 2000, but not for 2004. why ?

I just realized this was incorrect. Make it
IF(nYear % 4) = 0 THEN
  IsLeapYr = NOT (nYear % 100 = 0) OR (nYear % 400 = 0)
ENDIF
I think that's right.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform