From: alexander s. <a1...@us...> - 2007-02-10 19:00:47
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv18855 Modified Files: utils.py Log Message: allow date strings padded with spaces instead of zeroes Index: utils.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/utils.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** utils.py 20 Dec 2005 21:19:23 -0000 1.2 --- utils.py 10 Feb 2007 19:00:37 -0000 1.3 *************** *** 5,8 **** --- 5,9 ---- """ """History (most recent first): + 10-feb-2007 [als] allow date strings padded with spaces instead of zeroes 20-dec-2005 [yc] handle long objects in getDate/getDateTime 16-dec-2005 [yc] created from ``strutil`` module. *************** *** 63,66 **** --- 64,68 ---- return datetime.date.fromtimestamp(date) if isinstance(date, basestring): + date = date.replace(" ", "0") if len(date) == 6: # yymmdd |