Use an External Method like this one.
# Perché non usare un metodo esterno?
from DateTime import Date
def lastDay(year,month):
try:
last = Date(year,month+1,1)-1
return last.day
except:
return 31
José
Eric Walstad wrote:
Hi Paolo,
I have a Python Metho... er
Hi Paolo,
I have a Python Metho... er Python Script that I use that tells me the days
in each month. You pass in a Zope DateTime object as a parameter and it
returns the days in that month:
Parameters: ZopeDateTime
Code:
-8-- Start Snip --8-
if ZopeDateTime.isLeapYear():