[DB-SIG] DB-API Spec. 1.1a1

Magnus Lycka magnus.lycka@tripnet.se
Fri, 05 Dec 1997 14:46:43 +0100


At 12:32 1997-12-05 +0100, M.-A. Lemburg wrote:
>Do we need more formats apart from tuples and time floats 
>for date/time values, maybe strings ?

No.

I have to admit that I haven't actually used the DBI yet,
although I plan to do so soon. I assume that the tuple is
the ordinary python time module tuple.

I guess that's the standard way to treat dates in Python.
Sure, we often want dates as strings, but a) often these
dates (that should all have the same format) comes from 
somewhere else than the database, and b) the formats vary 
wildly depending on locale, taste etc.

Therefore, I suggest that string formatting of date is left
outside the DBI. For standard C look, there is time.asctime(),
and for other formats, we write our own dateformat.py modules
or watever.

Actuslly, I've been planning to write some kind of 'domains.py'
module where I define classes for dates, timestamps, money etc
with relevant attributes and methods. Is there anyone who has
done so, or would be interested in commenting?


	Magnus



--
Magnus Lycka, S/W Engineer, M.Sc.E.E; Folktrov. 6C, 907 51 Umea, Sweden
Tel: +46(0)90 198 498, GSM: +46(0)70 582 80 65, Fax: +46(0)70 612 80 65
<mailto:magnus.lycka@tripnet.se>         <http://www1.tripnet.se/~mly/>


_______________
DB-SIG  - SIG on Tabular Databases in Python

send messages to: db-sig@python.org
administrivia to: db-sig-request@python.org
_______________