[Python-checkins] python/dist/src/Doc/lib libdatetime.tex,NONE,1.1

akuchling@users.sourceforge.net akuchling@users.sourceforge.net
Wed, 18 Dec 2002 06:59:13 -0800


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv18504

Added Files:
	libdatetime.tex 
Log Message:
Check in current, unfinished, draft of datetime docs
(Fred, don't bother to add to lib.tex or to proofread this yet.)


--- NEW FILE: libdatetime.tex ---

\section{\module{datetime} -- 
         Basic date and time types}

\declaremodule{builtin}{datetime}
\modulesynopsis{Basic date and time types.}
\moduleauthor{Tim Peters}{tim@zope.com} % XXX check address
\sectionauthor{A.M. Kuchling}{amk@amk.ca}

\newcommand{\naive}{na\"ive}

The \module{datetime} module supplies classes for manipulating dates
and times in both simple and complex ways.  While date and time
arithmetic is supported, the focus of the implementation is on
efficient field extraction, for output formatting and manipulation.

There are two kinds of date and time objects: ``\naive'' and ``aware''.
This distinction refers to whether the object has any notion of time
zone, daylight savings time, or other kind of algorithmic or political
[...1100 lines suppressed...]

All objects are immutable, so accessors are read-only.  All macros
return ints:

    For date, datetime, and \class{datetimetz} instances:
        PyDateTime_GET_YEAR(o)
        PyDateTime_GET_MONTH(o)
        PyDateTime_GET_DAY(o)

    For \class{datetime} and \class{datetimetz} instances:
        PyDateTime_DATE_GET_HOUR(o)
        PyDateTime_DATE_GET_MINUTE(o)
        PyDateTime_DATE_GET_SECOND(o)
        PyDateTime_DATE_GET_MICROSECOND(o)

    For time and \class{timetz} instances:
        PyDateTime_TIME_GET_HOUR(o)
        PyDateTime_TIME_GET_MINUTE(o)
        PyDateTime_TIME_GET_SECOND(o)
        PyDateTime_TIME_GET_MICROSECOND(o)