Arjan Scherpenisse <[EMAIL PROTECTED]> wrote:

>i want to retrieve the number of the week from a DateTime object. Is
>there any way to do this? I've looked through but i
>couldnt find anything usefull, is there some algorithm to get this?

You can clean it up and condense but the following should work ...

<dtml-let today="_.DateTime()">
<dtml-let cur_year="today.year()">
<dtml-let start_of_year="_.DateTime('01/01/'+_.str(cur_year))">
<dtml-let num_days="today-start_of_year">
<dtml-let week_number="">
   <dtml-var week_number>


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to