I was looking at validators today & remembered your problem. While
formencode's DateConverter doesn't support arbitrary date formats,
there's a DateTimeConverter bundled with TG that does:
>>> from turbogears.validators import DateTimeConverter
>>> d = DateTimeConverter(format='%Y-%m-%d')
>>> d.to_python('2007-01-09')
datetime.datetime(2007, 1, 9, 0, 0)
>>>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---