Skip to content

Commit 70642af

Browse files
committed
Update datetime C-API documentation to include links
1 parent 0398e3c commit 70642af

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Doc/c-api/datetime.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Macro for access to the UTC singleton:
1818
.. c:var:: PyObject* PyDateTime_TimeZone_UTC
1919
2020
Returns the time zone singleton representing UTC, the same object as
21-
:attr:``datetime.timezone.utc``.
21+
:attr:`datetime.timezone.utc`.
2222

2323
.. versionadded:: 3.7
2424

@@ -89,39 +89,39 @@ Macros to create objects:
8989
9090
.. c:function:: PyObject* PyDate_FromDate(int year, int month, int day)
9191
92-
Return a ``datetime.date`` object with the specified year, month and day.
92+
Return a :class:`datetime.date` object with the specified year, month and day.
9393
9494
9595
.. c:function:: PyObject* PyDateTime_FromDateAndTime(int year, int month, int day, int hour, int minute, int second, int usecond)
9696
97-
Return a ``datetime.datetime`` object with the specified year, month, day, hour,
97+
Return a :class:`datetime.datetime` object with the specified year, month, day, hour,
9898
minute, second and microsecond.
9999
100100
101101
.. c:function:: PyObject* PyTime_FromTime(int hour, int minute, int second, int usecond)
102102
103-
Return a ``datetime.time`` object with the specified hour, minute, second and
103+
Return a :class:`datetime.time` object with the specified hour, minute, second and
104104
microsecond.
105105
106106
107107
.. c:function:: PyObject* PyDelta_FromDSU(int days, int seconds, int useconds)
108108
109-
Return a ``datetime.timedelta`` object representing the given number of days,
110-
seconds and microseconds. Normalization is performed so that the resulting
111-
number of microseconds and seconds lie in the ranges documented for
112-
``datetime.timedelta`` objects.
109+
Return a :class:`datetime.timedelta` object representing the given number
110+
of days, seconds and microseconds. Normalization is performed so that the
111+
resulting number of microseconds and seconds lie in the ranges documented for
112+
:class:`datetime.timedelta` objects.
113113
114114
.. c:function:: PyObject* PyTimeZone_FromOffset(PyDateTime_DeltaType* offset)
115115
116-
Return a ``datetime.timezone`` object with an unnamed fixed offset
116+
Return a :class:`datetime.timezone` object with an unnamed fixed offset
117117
represented by the *offset* argument.
118118
119119
.. versionadded:: 3.7
120120
121121
.. c:function:: PyObject* PyTimeZone_FromOffsetAndName(PyDateTime_DeltaType* offset, PyUnicode* name)
122122
123-
Return a ``datetime.timezone`` object with a fixed offset represented by
124-
the *offset* argument and with tzname *name*.
123+
Return a :class:`datetime.timezone` object with a fixed offset represented
124+
by the *offset* argument and with tzname *name*.
125125
126126
.. versionadded:: 3.7
127127
@@ -223,11 +223,11 @@ Macros for the convenience of modules implementing the DB API:
223223
224224
.. c:function:: PyObject* PyDateTime_FromTimestamp(PyObject *args)
225225
226-
Create and return a new ``datetime.datetime`` object given an argument tuple
227-
suitable for passing to ``datetime.datetime.fromtimestamp()``.
226+
Create and return a new :class:`datetime.datetime` object given an argument
227+
tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp()`.
228228
229229
230230
.. c:function:: PyObject* PyDate_FromTimestamp(PyObject *args)
231231
232-
Create and return a new ``datetime.date`` object given an argument tuple
233-
suitable for passing to ``datetime.date.fromtimestamp()``.
232+
Create and return a new :class:`datetime.date` object given an argument
233+
tuple suitable for passing to :meth:`datetime.date.fromtimestamp()`.

0 commit comments

Comments
 (0)