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
cbd6cd23
Commit
cbd6cd23
authored
Dec 31, 2002
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add markup for time object.
Cleanup whitespace. Fix unbalanced parenthesis.
parent
41c554fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
22 deletions
+23
-22
Doc/lib/libdatetime.tex
Doc/lib/libdatetime.tex
+23
-22
No files found.
Doc/lib/libdatetime.tex
View file @
cbd6cd23
...
@@ -184,12 +184,12 @@ Class attributes are:
...
@@ -184,12 +184,12 @@ Class attributes are:
\begin{tableii}
{
c|l
}{
code
}{
Attribute
}{
Value
}
\begin{tableii}
{
c|l
}{
code
}{
Attribute
}{
Value
}
\lineii
{
min
}{
The most negative
\class
{
timedelta
}
object,
\lineii
{
min
}{
The most negative
\class
{
timedelta
}
object,
\code
{
timedelta(-999999999)
}}
\code
{
timedelta(-999999999)
}}
\lineii
{
max
}{
The most positive
\class
{
timedelta
}
object,
\lineii
{
max
}{
The most positive
\class
{
timedelta
}
object,
timedelta(days=999999999, hours=23, minutes=59, seconds=59,
timedelta(days=999999999, hours=23, minutes=59, seconds=59,
microseconds=999999)
}
microseconds=999999)
}
\lineii
{
resolution
}{
The smallest possible difference between non-equal
\lineii
{
resolution
}{
The smallest possible difference between non-equal
\class
{
timedelta
}
objects,
\code
{
timedelta(microseconds=1)
}}
\class
{
timedelta
}
objects,
\code
{
timedelta(microseconds=1)
}}
\end{tableii}
\end{tableii}
Note that, because of normalization,
\code
{
timedelta.max
}
\textgreater
Note that, because of normalization,
\code
{
timedelta.max
}
\textgreater
...
@@ -226,12 +226,12 @@ Supported operations:
...
@@ -226,12 +226,12 @@ Supported operations:
{
The floor is computed and the remainder (if any) is thrown away.
}
{
The floor is computed and the remainder (if any) is thrown away.
}
{
(2)
}
{
(2)
}
\lineiii
{
+
\var
{
t1
}}
\lineiii
{
+
\var
{
t1
}}
{
Returns a
\class
{
timedelta
}
object with the same value.
}
{
Returns a
\class
{
timedelta
}
object with the same value.
}
{}
{}
\lineiii
{
-
\var
{
t1
}}
\lineiii
{
-
\var
{
t1
}}
{
equivalent to
\class
{
timedelta
}
(-
\var
{
t1.days
}
, -
\var
{
t1.seconds
}
,
{
equivalent to
\class
{
timedelta
}
(-
\var
{
t1.days
}
, -
\var
{
t1.seconds
}
,
-
\var
{
t1.microseconds
}
),and to
\var
{
t1
}
* -1.
}
-
\var
{
t1.microseconds
}
),and to
\var
{
t1
}
* -1.
}
{
(1)(3)
}
{
(1)(3)
}
\lineiii
{
abs(
\var
{
t
}
)
}
\lineiii
{
abs(
\var
{
t
}
)
}
{
equivalent to +
\var
{
t
}
when
\code
{
t.days >= 0
}
, and to -
\var
{
t
}
when
{
equivalent to +
\var
{
t
}
when
\code
{
t.days >= 0
}
, and to -
\var
{
t
}
when
\code
{
t.days < 0
}
.
}
\code
{
t.days < 0
}
.
}
...
@@ -250,7 +250,7 @@ This is exact, but may overflow.
...
@@ -250,7 +250,7 @@ This is exact, but may overflow.
Division by 0 raises
\exception
{
ZeroDivisionError
}
.
Division by 0 raises
\exception
{
ZeroDivisionError
}
.
\item
[(3)]
\item
[(3)]
-
\var
{
timedelta.max
}
is not representable as a
\class
{
timedelta
}
object
)
.
-
\var
{
timedelta.max
}
is not representable as a
\class
{
timedelta
}
object.
\end{description}
\end{description}
...
@@ -741,23 +741,24 @@ Instance methods:
...
@@ -741,23 +741,24 @@ Instance methods:
\subsection
{
\class
{
time
}
Objects
\label
{
datetime-time
}}
\subsection
{
\class
{
time
}
Objects
\label
{
datetime-time
}}
A
time object represents an idealized time of day, independent of day
A
\class
{
time
}
object represents an idealized time of day, independent
and timezone.
of day
and timezone.
Constructor:
\begin{funcdesc}
{
hour=0, minute=0, second=0, microsecond=0
}
time(hour=0, minute=0, second=0, microsecond=0)
All arguments are optional. They may be ints or longs, in the
All arguments are optional. They may be ints or longs, in the
following ranges:
following ranges:
0 <= hour < 24
\begin{itemize}
0 <= minute < 60
\item
\code
{
0 <=
\var
{
hour
}
< 24
}
0 <= second < 60
\item
\code
{
0 <=
\var
{
minute
}
< 60
}
0 <= microsecond < 1000000
\item
\code
{
0 <=
\var
{
second
}
< 60
}
\item
\code
{
0 <=
\var
{
microsecond
}
< 1000000
}
\end{itemize}
If an argument outside those ranges is given,
If an argument outside those ranges is given,
\exception
{
ValueError
}
is
\exception
{
ValueError
}
is raised.
raised.
\end{funcdesc}
Class attributes:
Class attributes:
...
@@ -1423,7 +1424,7 @@ Type-check macros:
...
@@ -1423,7 +1424,7 @@ Type-check macros:
PyDelta
_
CheckExact(op)
PyDelta
_
CheckExact(op)
PyTZInfo
_
Check(op)
PyTZInfo
_
Check(op)
PyTZInfo
_
CheckExact(op
PyTZInfo
_
CheckExact(op
)
Accessor macros:
Accessor macros:
...
...
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