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.today()
print today 2004-06-01 yesterday = datetime.date(today.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)
iD8DBQFAvGe4aP33v4T41CURAkQGAKChO0yxPDxHwXHTsNOb0e O92zECGgCdHKZ2
Irj6f33KpdXvwxsIhkM+Bo8=
=IRWr
-----END PGP SIGNATURE-----