Re: calendar.Calender() Liefert zuviel
"Ulrich M. Schwarz" <[email protected]>
| Newsgroups | gmane.comp.web.zope.german |
|---|---|
| Organization | Rechenzentrum der Universität Kiel |
| Message-ID | <[email protected]> |
On 03/21/2011 11:02 AM, Vladislav Vorobiev wrote:
> Hallo,
>
> ich habe eine Frage zur Python Calender.
>
>>>> c=calendar.Calendar()
>>>> for i in c.itermonthdates(2001,01):
> ... print i
> ...
> 2001-01-01
[...]
> 2001-02-04
>
> Wieso bekomme ich eigentlich auch Februar mit ausgeliefert?
> Ist das Modul irgend wie veraltet?
Hallo, du bekommst Tage bis zum Ende der Woche geliefert:
>>> print c.itermonthdates.__doc__
Return an iterator for one month. The iterator will yield
datetime.date
values and will always iterate through complete weeks, so it
will yield
dates outside the specified month.
Liebe Grüße
Ulrich
--
Ulrich M. Schwarz
[email protected] --- LMS 4, Raum 17a --- Tel. 880-1403
_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope