Converting from week no. to date
DateTime().strftime("%U") converts from date to week no. Is it possible to convert from (week,year,weekday) to a specific date in a python script in zope ? I could install the mx.DateTime module in python and then make a product with a method that used ISO.Week() but is there a more straight forward approach ?
--On 1. Mai 2006 17:16:13 +0200 Jonas Nielsen <jonasn@mail.tele.dk> wrote:
DateTime().strftime("%U") converts from date to week no.
Is it possible to convert from (week,year,weekday) to a specific date in a python script in zope ?
The DateTime API does not support this. -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: info@zopyx.com - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting
On 5/1/06, Jonas Nielsen <jonasn@mail.tele.dk> wrote:
DateTime().strftime("%U") converts from date to week no.
Is it possible to convert from (week,year,weekday) to a specific date in a python script in zope ?
I could install the mx.DateTime module in python and then make a product with a method that used ISO.Week() but is there a more straight forward approach ?
Well, steal some code from http://svn.nuxeo.org/trac/pub/file/CalCore/trunk/src/calcore/isoweek.py maybe? -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/
Lennart Regebro wrote:
Well, steal some code from http://svn.nuxeo.org/trac/pub/file/CalCore/trunk/src/calcore/isoweek.py maybe?
Well it uses datetime (as opposed to Zope's DateTime) which isn't available in python scripts. However it is a better solution than installing a third module. So I think I will use that (in an external method). Thanks.
participants (3)
-
Andreas Jung -
Jonas Nielsen -
Lennart Regebro