On 4/12/11 2:56 PM, Ed Leafe wrote:
> import calendar
> return calendar.isleap(year)

Hmm, looking at the source, at least in Python 2.6.5, I think the isleap() 
function 
isn't as efficient as it could be. But it is one line. Here it is, converted to 
VFP 
if anyone wants it:

{{{

FUNC isleap(nYear):
   RETURN m.nYear % 4 == 0 AND (m.nYear % 100 != 0 OR m.nYear % 400 == 0)

}}}

Paul

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to