Massimo, I had to add:
T.force('en-nl') to db.py to get the strings translated. This introduced the following error: File "/Library/Python/2.5/site-packages/web2pyfitwise/applications/ core/controllers/eventlist.py", line 25, in byplace todate=IS_DATE()(fromdate)[0]+datetime.timedelta(days=int (request.vars.dagen)) TypeError: cannot concatenate 'str' and 'datetime.timedelta' objects The code in the function reads like: fromdate=request.vars.datum todate=IS_DATE()(fromdate)[0]+datetime.timedelta(days=int (request.vars.dagen)) where, datum refers to the field that has been translated: SQLField('datum',type='date',requires=[IS_DATE(str(T('%Y-%m-%d'))), IS_NOT_EMPTY()]) I expected this error to occur: >> What are the consequences of these two options for these line of code: >> fromdate=request.vars.datum > >todate=IS_DATE()(fromdate)[0]+datetime.timedelta(days=int >> (request.vars.dagen)) >> Here todate should be calculated as: fromdate + days = todate >> It worked when I used the YYYY-MM-DD format, however, now that I >> changed the format to DD-MM-YYYY I expect it to break. >It will not break. The date as stored by the system is always >independent by the way you choose to represent it when printed. I hope you can provide me with a solution to solve this problem. Annet. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---