[Python-checkins] python/dist/src/Doc/lib libdatetime.tex,1.33,1.34

akuchling@users.sourceforge.net akuchling@users.sourceforge.net
Thu, 09 Jan 2003 05:46:32 -0800


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

Modified Files:
	libdatetime.tex 
Log Message:
Various minor edits

Index: libdatetime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdatetime.tex,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** libdatetime.tex	9 Jan 2003 12:51:50 -0000	1.33
--- libdatetime.tex	9 Jan 2003 13:46:30 -0000	1.34
***************
*** 17,21 ****
  and times in both simple and complex ways.  While date and time
  arithmetic is supported, the focus of the implementation is on
! efficient member extraction, for output formatting and manipulation.
  
  There are two kinds of date and time objects: ``naive'' and ``aware''.
--- 17,21 ----
  and times in both simple and complex ways.  While date and time
  arithmetic is supported, the focus of the implementation is on
! efficient member extraction for output formatting and manipulation.
  
  There are two kinds of date and time objects: ``naive'' and ``aware''.
***************
*** 29,41 ****
  the cost of ignoring some aspects of reality.
  
! For applications requiring more, \class{datetime} and \class{time} objects
! have an optional time zone information member.
! These \class{tzinfo} objects capture information about the offset from
! UTC time, the time zone name, and whether Daylight Saving Time is in
! effect.  Note that no concrete \class{tzinfo} classes are supplied by
! the \module{datetime} module.  Instead, they provide a framework for
! incorporating the level of detail an app may require.  The rules for
! time adjustment across the world are more political than rational, and
! there is no standard suitable for every app.
  
  The \module{datetime} module exports the following constants:
--- 29,43 ----
  the cost of ignoring some aspects of reality.
  
! For applications requiring more, \class{datetime} and \class{time}
! objects have an optional time zone information member,
! \member{tzinfo}, that can contain an instance of a subclass of 
! the abstract \class{tzinfo} class.  These \class{tzinfo} objects
! capture information about the offset from UTC time, the time zone
! name, and whether Daylight Saving Time is in effect.  Note that no
! concrete \class{tzinfo} classes are supplied by the \module{datetime}
! module.  Instead, they provide a framework for incorporating the level
! of detail an application may require.  The rules for time adjustment across
! the world are more political than rational, and there is no standard
! suitable for every application.
  
  The \module{datetime} module exports the following constants:
***************
*** 74,78 ****
  
  \begin{classdesc*}{datetime}
!   A combination of a naive date and a time.
    Attributes: \member{year}, \member{month}, \member{day},
                \member{hour}, \member{minute}, \member{second},
--- 76,80 ----
  
  \begin{classdesc*}{datetime}
!   A combination of a date and a time.
    Attributes: \member{year}, \member{month}, \member{day},
                \member{hour}, \member{minute}, \member{second},
***************
*** 81,86 ****
  
  \begin{classdesc*}{timedelta}
!   A duration, expressing the difference between two \class{date},
!   \class{time}, or \class{datetime} instances, to microsecond
    resolution.
  \end{classdesc*}
--- 83,88 ----
  
  \begin{classdesc*}{timedelta}
!   A duration expressing the difference between two \class{date},
!   \class{time}, or \class{datetime} instances to microsecond
    resolution.
  \end{classdesc*}
***************
*** 89,93 ****
    An abstract base class for time zone information objects.  These
    are used by the  \class{datetime} and \class{time} classes to
!   provided a customizable notion of time adjustment (for example, to
    account for time zone and/or daylight saving time).
  \end{classdesc*}
--- 91,95 ----
    An abstract base class for time zone information objects.  These
    are used by the  \class{datetime} and \class{time} classes to
!   provide a customizable notion of time adjustment (for example, to
    account for time zone and/or daylight saving time).
  \end{classdesc*}
***************
*** 99,103 ****
  An object \var{d} of type \class{time} or \class{datetime} may be
  naive or aware.  \var{d} is aware if \code{\var{d}.tzinfo} is not
! \code{None}, and \code{\var{d}.tzinfo.utcoffset(\var{d})} does not return
  \code{None}.  If \code{\var{d}.tzinfo} is \code{None}, or if
  \code{\var{d}.tzinfo} is not \code{None} but
--- 101,105 ----
  An object \var{d} of type \class{time} or \class{datetime} may be
  naive or aware.  \var{d} is aware if \code{\var{d}.tzinfo} is not
! \code{None} and \code{\var{d}.tzinfo.utcoffset(\var{d})} does not return
  \code{None}.  If \code{\var{d}.tzinfo} is \code{None}, or if
  \code{\var{d}.tzinfo} is not \code{None} but
***************
*** 133,142 ****
    internally.  Arguments are converted to those units:
  
! \begin{verbatim}
! A millisecond is converted to 1000 microseconds.
! A minute is converted to 60 seconds.
! An hour is converted to 3600 seconds.
! A week is converted to 7 days.
! \end{verbatim}
  
    and days, seconds and microseconds are then normalized so that the
--- 135,144 ----
    internally.  Arguments are converted to those units:
  
! \begin{itemize}
!   \item A millisecond is converted to 1000 microseconds.
!   \item A minute is converted to 60 seconds.
!   \item An hour is converted to 3600 seconds.
!   \item A week is converted to 7 days.
! \end{itemize}
  
    and days, seconds and microseconds are then normalized so that the
***************
*** 149,153 ****
  \end{itemize}
  
!   If any argument is a float, and there are fractional microseconds,
    the fractional microseconds left over from all arguments are combined
    and their sum is rounded to the nearest microsecond.  If no
--- 151,155 ----
  \end{itemize}
  
!   If any argument is a float and there are fractional microseconds,
    the fractional microseconds left over from all arguments are combined
    and their sum is rounded to the nearest microsecond.  If no
***************
*** 200,203 ****
--- 202,206 ----
  Supported operations:
  
+ % XXX this table is too wide!
  \begin{tableiii}{c|l|c}{code}{Operation}{Result}{Notes}
    \lineiii{\var{t1} = \var{t2} + \var{t3}}
***************
*** 225,234 ****
    \lineiii{-\var{t1}}
            {equivalent to \class{timedelta}(-\var{t1.days}, -\var{t1.seconds},
!            -\var{t1.microseconds}),and to \var{t1}* -1.}
            {(1)(4)}
    \lineiii{abs(\var{t})}
            {equivalent to +\var{t} when \code{t.days >= 0}, and to
!            -\var{t} when \code{t.days < 0}.
!            overflow.}
            {(2)}
  \end{tableiii}
--- 228,236 ----
    \lineiii{-\var{t1}}
            {equivalent to \class{timedelta}(-\var{t1.days}, -\var{t1.seconds},
!            -\var{t1.microseconds}), and to \var{t1}* -1.}
            {(1)(4)}
    \lineiii{abs(\var{t})}
            {equivalent to +\var{t} when \code{t.days >= 0}, and to
!            -\var{t} when \code{t.days < 0}.}
            {(2)}
  \end{tableiii}
***************
*** 258,262 ****
  to be the smaller timedelta.
  
! \class{timedelta} objects are hashable (usable as dictionary key),
  support efficient pickling, and in Boolean contexts, a \class{timedelta}
  object is considered to be true if and only if it isn't equal to
--- 260,264 ----
  to be the smaller timedelta.
  
! \class{timedelta} objects are hashable (usable as dictionary keys),
  support efficient pickling, and in Boolean contexts, a \class{timedelta}
  object is considered to be true if and only if it isn't equal to
***************
*** 333,337 ****
  
  \begin{memberdesc}{year}
!   Between \constant{MINYEAR} and \constant{MAXYEAR} inclusive
  \end{memberdesc}
  
--- 335,339 ----
  
  \begin{memberdesc}{year}
!   Between \constant{MINYEAR} and \constant{MAXYEAR} inclusive.
  \end{memberdesc}
  
***************
*** 347,350 ****
--- 349,353 ----
  Supported operations:
  
+ % XXX rewrite to be a table
  \begin{itemize}
    \item