date diff calc

Peter Hansen peter at engcorp.com
Tue Nov 30 10:01:37 EST 2004


Tim Peters wrote:
> [Skip Montanaro]
>>I think inputs from strings would be much more common.
> 
> Me too, although it's a bottomless pit.
> 
> guess-6-intended-meanings-for-1/2/3-before-breakfast-ly y'rs

I think Skip was intending that the format string be mandatory,
to avoid such ambiguity.  At least, that's what I inferred from
his example, where the format string came before the date string:

   start = datetime.date.fromstring("%Y-%m-%d", "2004-11-25")

-Peter



More information about the Python-list mailing list