Module like Perl's Date::Calc
Gerrit Holl
gerrit at nl.linux.org
Thu Jun 12 17:15:27 EDT 2003
Roy Marteen wrote:
> I am new to Python. I used to program in Perl, and I used a lot of
> function from Date::Calc module in Perl. I am just wondering is there any
> similar module in Python?
Python 2.3 has a datetime module, which is very good.
$ python -c 'import datetime; print datetime.datetime.now()'
2003-06-12 23:13:46.530214
$ python -c 'import datetime; print datetime.datetime.now() - datetime.datetime(1985,8,13)'
6512 days, 23:14:26.666743
See also: http://www.python.org/dev/doc/devel/lib/module-datetime.html
yours,
Gerrit.
--
198. If he put out the eye of a freed man, or break the bone of a freed
man, he shall pay one gold mina.
-- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
http://www.sp.nl/
More information about the Python-list
mailing list