script for seconds in given month?
aleax at mac.com
Tue Apr 17 06:41:00 CEST 2007
edfialk <edfialk at gmail.com> wrote:
> Hi, does anyone happen to know of a script that would return the
> number of seconds in a month if I give it a month and a year?
> My python is a little weak, but if anyone could offer some suggestions
> I think I could handle it myself, or if anyone happens to know of a
> script already written that performs this I would be extremely
def seconds_in_month(month, year):
nomatter, daysinmonth = calendar.monthrange(year, month)
return daysinmonth * 24 * 60 * 60
More information about the Python-list