Re: current week / weeks in year - best practice
- From: Aljosa Mohorovic <aljosa.mohorovic@xxxxxxxxx>
- Date: Thu, 31 Jul 2008 08:42:46 -0700 (PDT)
On Jul 31, 3:58 pm, "Diez B. Roggisch" <de...@xxxxxxxxxxxxx> wrote:
Instead of datetime.now() use date.today(), which removes a lot of
boilerplate.
int(date.today().strftime("%W"))
Apart from that, I think it's the way to go.
what if i know current context week = 20 (example), what would be the
best way to get datetime objects for first and last day of current
context week?
by "current context week" i don't mean current week for current year
but current week when program is iterating all weeks in year.
Aljosa
.
- Follow-Ups:
- Re: current week / weeks in year - best practice
- From: Aljosa Mohorovic
- Re: current week / weeks in year - best practice
- References:
- current week / weeks in year - best practice
- From: Aljosa Mohorovic
- Re: current week / weeks in year - best practice
- From: Diez B. Roggisch
- current week / weeks in year - best practice
- Prev by Date: Re: Newbie Python questions
- Next by Date: Re: Swap memory in Python ? - three questions
- Previous by thread: Re: current week / weeks in year - best practice
- Next by thread: Re: current week / weeks in year - best practice
- Index(es):
Relevant Pages
|