@Massimo I have seen that the datetime type is not a fundamental of Python but really a floating number based on seconds since 1970. I still don't understand why we could not intercept the method call and pass the value that will work to the GAE interface layer.
On Mon, May 11, 2009 at 5:11 PM, mdipierro <[email protected]> wrote: > > No because this would work for year but there is no way to make it > work month() and day() or time differences. GAE just does not support > the operations. There are reports that even soting by date/datetime > does not work well. > > On May 10, 8:08 pm, Steve Shepherd <[email protected]> wrote: > > @Massimo > > > > Couldn't the GAE class be overloaded with another datetime class that > does > > include the code to translate the normal method call i.e. > > db(db.mydatefield.year()==1999).select() > > > > So the added on class includes a new method for year() but runs code that > > translates the 1999 into the code that you specified i.e. > > > db((db.mydatefield>datetime.date(1998,12,31))?(db.mytabefield<datetime.date(2000,1,1))).select() > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

