you can "import time" and use it
From
http://docs.python.org/lib/module-time.htmlThe description for the time tuple is:
0 tm_year (for example, 1993)
1 tm_mon range [1,12]
2 tm_mday range [1,31]
3 tm_hour range [0,23]
4 tm_min range [0,59]
5 tm_sec range [0,61]; see (1) in strftime() description
6 tm_wday range [0,6], Monday is 0
7 tm_yday range [1,366]
8 tm_isdst 0, 1 or -1; see below
so you can grab tm_wday to get the weekday value.
eg
(yr, mo, da, h, m, s, wd, jd, ds) = time.localtime(time.time())
time.mktime((year, month, day, hours, mins, seconds, wd, jd, ds))
The last thing is daylight savings time. From experiments, 1 is true for DST.
"since the dst flag is needed; use -1 as the dst flag if it is unknown "
I tried to use strptime to enter the date without the whole tuple, but it didn't work in the emulator, so I assume it isn't supported on the phone. :(
eg time.mktime(time.strptime(da+u"/"+mo+u"/"+yr, "%d/%m/%Y"))
So then I wrote functions to calcuate the day of week, day of year etc, but then I found out you don't need to because the function is smart and will fix it when you enter.
Example:
>>newTime = time.mktime((2005, 05, 29, 0, 0,0, 0, 0, -1))
>>(yr, mo, da, h, m, s, wd, jd, ds) = time.localtime(newTime)
>>print wd
6 (It's a sunday)
>>print jd
149
score.