Hello all.

I wonder if the function typecast_date() on /usr/lib/python2.5/site-
packages/django/db/backends/util.py:58 assumes the string 's' to be of
'YYYY-MM-DD' format.

Here's the function in question (as of r6460):

def typecast_date(s):
    return s and datetime.date(*map(int, s.split('-'))) or None

Should the above format be expected, would a sliced 's' be preferable,
like this:

def typecast_date(s):
    return s and datetime.date(*map(int, s[:N].split('-'))) or None

Where N could be, e.g., 10.

What do you think?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to