Message from discussion script for seconds in given month?
The group you are posting to is a Usenet group
. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Date: Mon, 16 Apr 2007 12:18:29 -0500
Local: Mon, Apr 16 2007 1:18 pm
Subject: Re: script for seconds in given month?
Matt> from time import mktime
Matt> def secondsInMonth(year, month):
Matt> s1 = mktime((year,month,1,0,0,0,0,0,-1))
Matt> s2 = mktime((year,month+1,1,0,0,0,0,0,-1))
Matt> return s2-s1
Probably won't work if month==12. ;-)
You must Sign in
before you can post messages.
You do not have the permission required to post.