Různé wrote:
> dobrý den, potřebuji poradit proč mě tento script ukazuje špatné
> číslo kalendářního týdne, číslo je pořád o jedno menší by mělo být a
> přitom to minulí rok fungovalo správně děkuji za pomoc Pavel
> Svobodník
>
> import time dat="160209" dat_kw = time.strptime(dat, '%d%m%y') print
> time.strftime('%W', dat_kw)
>
> výsledek je 7 ale má být 8

man 3 strftime

%U -- The week number of the current year as a decimal number, range 00
to 53, starting with the first Sunday as the first day of week 01. See
also %V and %W.

%V -- The ISO 8601:1988 week number of the current year as a decimal
number, range 01 to 53, where week 1 is the first week that has at least
4 days in the current year, and with Monday as the first day of the
week. See also %U and %W. (SU)

%W -- The week number of the current year as a decimal number, range 00
to 53, starting with the first Monday as the first day of week 01.

Ale dostupnost zalezi na tom, ktery operacni system pan Ruzne pouziva. :)

-- 
\//\/\
http://macek.sandbox.cz
http://www.easis.cz

begin:vcard
fn:Vlada Macek
n:Macek;Vlada
adr:;;;Liberec;;;Czech Republic
email;internet:[email protected]
title:Software || Networking && UNIX
tel;cell:+420 608 978 164
note;quoted-printable:GPG info: key 0x1F059424, fingerprint 1494 F8DD 6379 4CD7 E7E3 1FC9 D7504=
	243 1F05 9424=0D=0A=
	=0D=0A=
	When you find a virus in mail from me, then I intended to infect you, sin=
	ce I use SW that is not distributing malware w/o my knowledge.=0D=0A=
	
x-mozilla-html:FALSE
url:http://macek.sandbox.cz
version:2.1
end:vcard

_______________________________________________
Python mailing list
[email protected]
http://www.py.cz/mailman/listinfo/python

Odpovedet emailem