Find day of week from month and year

Robert Kern rkern at ucsd.edu
Fri Sep 2 21:31:48 CEST 2005


Laguna wrote:
> Hi Gurus,
> 
> I want to find the expiration date of stock options (3rd Friday of the
> month) for an any give month and year. I have tried a few tricks with
> the functions provided by the built-in module time, but the problem was
> that the 9 element tuple need to be populated correctly. Can anyone
> help me out on this one?

mx.DateTime provides a RelativeDateTime constructor that handles things
like this.

http://www.egenix.com/files/python/mxDateTime.html

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter




More information about the Python-list mailing list