Creating a list of Mondays for a year

Charles Krug cdkrug at worldnet.att.net
Mon Sep 19 09:00:18 EDT 2005


On Mon, 19 Sep 2005 12:10:04 GMT, Chris <secun at yahoo.com> wrote:
> Thanks to everyone for your help!
> 
> That fit the need perfectly.
> 
> In article <MPG.1d9793f75f578ce1989686 at news2.atlantic.net>, 
> secun at yahoo.com says...
>> Is there a way to make python create a list of Mondays for a given year?
>> 
>> For example,
>> 
>> mondays = ['1/3/2005','1/10/2005','1/17/2005','1/24/2005',
>> '1/31/2005','2/7/2005',   ... ]
>> 

You can also calculate it using the Julian Day Number.  Google on
astronomical calculations, or read the introduction to one of the
Numerical Recipies. . . books for a discussion and algorithm.




More information about the Python-list mailing list