On 1/15/07, Aaron Bostick <[EMAIL PROTECTED]> wrote:

 Jorge,

 I tried the DateTimeConverter() as you suggested and it mostly works.  The
problem is pagination's query strings just return __str__() from the object
ignoring format options for something like a datetime.  datetime returns
hours and minutes which the validator rejects if your format is %Y-%m-%d.
I see it makes sense

 What I did is basically copy DateTimeConverter to make my own DateConverter
that doesn't use datetime.datetime objects, but instead datetime.date
objects.  The changes between the two are trivial but this version of
DateConverter supports variable formats unlike the formencode version.  Any
chance to get something like this put in the turbogears validators module?

I don't see why it shouldn't having a plain date datatype seems like a
good idea.
Could you open a ticket? set it for the 1.1 milestone.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to