On 11/9/10 7:32 AM, John Fabiani wrote:
> I was wondering if it was intended that the getDateFromString() method not
> accept a four digit year in a string?
>
> daboDate.getDateFromString('06/19/66')
> datetime.date(2066, 6, 19)
>
> daboDate.getDateFromString('06/19/1966')

getDateFromString() by default only converts dates in 2 formats. It'll try them 
in 
this order:

ISO8601 ("YYYY-MM-DD")
%x (the current locale's date format)

What's happening to you is that the current locale's format must be %m/%d/%y 
(MM/DD/YY) but you are passing the 4-digit year and python's time.strftime() 
function 
can't convert it.

Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to