Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0419ede6
Commit
0419ede6
authored
Sep 04, 2003
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #792338: Correct documentation for timetuple return type.
parent
efea7f5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Doc/lib/libdatetime.tex
Doc/lib/libdatetime.tex
+7
-7
No files found.
Doc/lib/libdatetime.tex
View file @
0419ede6
...
...
@@ -428,15 +428,15 @@ Instance methods:
\end{methoddesc}
\begin{methoddesc}
{
timetuple
}{}
Return a
9-element tuple of the form
returned by
Return a
\class
{
time.struct
_
time
}
such as
returned by
\function
{
time.localtime()
}
. The hours, minutes and seconds are
0, and the DST flag is -1.
\code
{
\var
{
d
}
.timetuple()
}
is equivalent to
\code
{
(
\var
{
d
}
.year,
\var
{
d
}
.month,
\var
{
d
}
.day,
\code
{
time.struct
_
time(
(
\var
{
d
}
.year,
\var
{
d
}
.month,
\var
{
d
}
.day,
0, 0, 0,
\var
{
d
}
.weekday(),
\var
{
d
}
.toordinal() - date(
\var
{
d
}
.year, 1, 1).toordinal() + 1,
-1)
}
-1)
)
}
\end{methoddesc}
\begin{methoddesc}
{
toordinal
}{}
...
...
@@ -858,14 +858,14 @@ Instance methods:
\end{methoddesc}
\begin{methoddesc}
{
timetuple
}{}
Return a
9-element tuple of the form
returned by
Return a
\class
{
time.struct
_
time
}
such as
returned by
\function
{
time.localtime()
}
.
\code
{
\var
{
d
}
.timetuple()
}
is equivalent to
\code
{
(
\var
{
d
}
.year,
\var
{
d
}
.month,
\var
{
d
}
.day,
\code
{
time.struct
_
time(
(
\var
{
d
}
.year,
\var
{
d
}
.month,
\var
{
d
}
.day,
\var
{
d
}
.hour,
\var
{
d
}
.minute,
\var
{
d
}
.second,
\var
{
d
}
.weekday(),
\var
{
d
}
.toordinal() - date(
\var
{
d
}
.year, 1, 1).toordinal() + 1,
dst)
}
dst)
)
}
The
\member
{
tm
_
isdst
}
flag of the result is set according to
the
\method
{
dst()
}
method:
\member
{
tzinfo
}
is
\code
{
None
}
or
\method
{
dst()
}
returns
\code
{
None
}
,
...
...
@@ -881,7 +881,7 @@ Instance methods:
for a UTC time.
If
\var
{
d
}
is aware,
\var
{
d
}
is normalized to UTC time, by subtracting
\code
{
\var
{
d
}
.utcoffset()
}
, and a
timetuple
for the
\code
{
\var
{
d
}
.utcoffset()
}
, and a
\class
{
time.struct
_
time
}
for the
normalized time is returned.
\member
{
tm
_
isdst
}
is forced to 0.
Note that the result's
\member
{
tm
_
year
}
member may be
\constant
{
MINYEAR
}
-1 or
\constant
{
MAXYEAR
}
+1, if
\var
{
d
}
.year was
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment