~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Doc/library/datetime.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
 
66
66
 
67
67
.. class:: date
 
68
   :noindex:
68
69
 
69
70
   An idealized naive date, assuming the current Gregorian calendar always was, and
70
71
   always will be, in effect. Attributes: :attr:`year`, :attr:`month`, and
72
73
 
73
74
 
74
75
.. class:: time
 
76
   :noindex:
75
77
 
76
78
   An idealized time, independent of any particular day, assuming that every day
77
79
   has exactly 24\*60\*60 seconds (there is no notion of "leap seconds" here).
80
82
 
81
83
 
82
84
.. class:: datetime
 
85
   :noindex:
83
86
 
84
87
   A combination of a date and a time. Attributes: :attr:`year`, :attr:`month`,
85
88
   :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:`microsecond`,
87
90
 
88
91
 
89
92
.. class:: timedelta
 
93
   :noindex:
90
94
 
91
95
   A duration expressing the difference between two :class:`date`, :class:`time`,
92
96
   or :class:`datetime` instances to microsecond resolution.
231
235
|                                | (-*t1.days*, -*t1.seconds*,                   |
232
236
|                                | -*t1.microseconds*), and to *t1*\* -1. (1)(4) |
233
237
+--------------------------------+-----------------------------------------------+
234
 
| ``abs(t)``                     | equivalent to +*t* when ``t.days >= 0``, and  |
 
238
| ``abs(t)``                     | equivalent to +\ *t* when ``t.days >= 0``, and|
235
239
|                                | to -*t* when ``t.days < 0``. (2)              |
236
240
+--------------------------------+-----------------------------------------------+
237
241
 
467
471
   Return a 3-tuple, (ISO year, ISO week number, ISO weekday).
468
472
 
469
473
   The ISO calendar is a widely used variant of the Gregorian calendar. See
470
 
   http://www.phys.uu.nl/ vgent/calendar/isocalendar.htm for a good explanation.
 
474
   http://www.phys.uu.nl/~vgent/calendar/isocalendar.htm for a good
 
475
   explanation.
471
476
 
472
477
   The ISO year consists of 52 or 53 full weeks, and where a week starts on a
473
478
   Monday and ends on a Sunday.  The first week of an ISO year is the first