A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/325007.html below:

Find day of week from month and year

Find day of week from month and yearLaguna ed_zeng at yahoo.com
Fri Sep 2 16:36:18 EDT 2005
> What do you mean by, "the 9 element tuple need to be populated
> correctly"?  Do you need someone to tell you what values it
> needs?  What happens if you use (2005, 9, 1, 0, 0, 0, 0, 0, 0),
> for example?  If you make this tuple with localtime or gmtime,
> do you know what the 7th (tm[6]) element of the tuple is?
> What tricks did you try, exactly?
>
>    Donn Cave, donn at u.washington.edu

Thanks for pointing out. tm[6] = weekday, and tm[7] = Julian data, but
I wouldn't know these values when my input values are month and year.

I will try out the more constructive suggestions from Paul and Robert.

Following is what I have tried. As you can tell, the results are wrong!

>>> import time
>>> time.asctime((2003, 9, 1, 0, 0, 0, 0, 0, 0))
'Mon Sep 01 00:00:00 2003'
>>> time.asctime((2003, 8, 1, 0, 0, 0, 0, 0, 0))
'Mon Aug 01 00:00:00 2003'
>>> time.asctime((2003, 7, 1, 0, 0, 0, 0, 0, 0))
'Mon Jul 01 00:00:00 2003'


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4