Hash: SHA1
I'm trying to use the datetime module. The following seems to work
any day except the first day of the month:
import datetime
today = datetime.date.t oday()
print today 2004-06-01 yesterday = datetime.date(t oday.year, today.month, today.day-1)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: day is out of range for month
In other languages (specifically Java, but I'm sure these are others),
this would come out as "2004-05-31".
Is this is a bug, or outside of the functionality of datetime?
- --
Mike Hostetler
th*****@binary. net
http://www.binary.net/thehaas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAvGe4aP3 3v4T41CURAkQGAK ChO0yxPDxHwXHTs NOb0eO92zECGgCd HKZ2
Irj6f33KpdXvwxs IhkM+Bo8=
=IRWr
-----END PGP SIGNATURE-----