@@ -85,7 +85,7 @@ The :mod:`!datetime` module exports the following constants:
85
85
.. data :: MINYEAR
86
86
87
87
The smallest year number allowed in a :class: `date ` or :class: `.datetime ` object.
88
- :const: `MINYEAR ` is `` 1 `` .
88
+ :const: `MINYEAR ` is 1 .
89
89
90
90
91
91
.. data :: MAXYEAR
@@ -207,7 +207,7 @@ A :class:`timedelta` object represents a duration, the difference between two
207
207
208
208
.. class :: timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)
209
209
210
- All arguments are optional and default to `` 0 `` . Arguments may be integers
210
+ All arguments are optional and default to 0 . Arguments may be integers
211
211
or floats, and may be positive or negative.
212
212
213
213
Only *days *, *seconds * and *microseconds * are stored internally.
@@ -614,7 +614,7 @@ Notes:
614
614
615
615
(3)
616
616
This is exact, and cannot overflow. ``timedelta.seconds `` and
617
- ``timedelta.microseconds `` are `` 0 `` , and ``date2 + timedelta == date1 `` after.
617
+ ``timedelta.microseconds `` are 0 , and ``date2 + timedelta == date1 `` after.
618
618
619
619
(4)
620
620
:class: `date ` objects are equal if they represent the same date.
@@ -671,7 +671,7 @@ Instance methods:
671
671
time.struct_time((d.year, d.month, d.day, 0, 0, 0, d.weekday(), yday, -1))
672
672
673
673
where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1 ``
674
- is the day number within the current year starting with `` 1 `` for January 1st.
674
+ is the day number within the current year starting with 1 for January 1st.
675
675
676
676
677
677
.. method :: date.toordinal()
@@ -752,7 +752,7 @@ Instance methods:
752
752
.. method :: date.strftime(format)
753
753
754
754
Return a string representing the date, controlled by an explicit format string.
755
- Format codes referring to hours, minutes or seconds will see `` 0 `` values.
755
+ Format codes referring to hours, minutes or seconds will see 0 values.
756
756
See also :ref: `strftime-strptime-behavior ` and :meth: `date.isoformat `.
757
757
758
758
@@ -841,7 +841,7 @@ from a :class:`date` object and a :class:`.time` object.
841
841
842
842
Like a :class: `date ` object, :class: `.datetime ` assumes the current Gregorian
843
843
calendar extended in both directions; like a :class: `.time ` object,
844
- :class: `.datetime ` assumes there are exactly `` 3600*24 `` seconds in every day.
844
+ :class: `.datetime ` assumes there are exactly 3600\ * 24 seconds in every day.
845
845
846
846
Constructor:
847
847
@@ -945,7 +945,7 @@ Other constructors, all class methods:
945
945
failure.
946
946
947
947
.. versionchanged :: 3.6
948
- :meth: `fromtimestamp ` may return instances with :attr: `.fold ` set to `` 1 `` .
948
+ :meth: `fromtimestamp ` may return instances with :attr: `.fold ` set to 1 .
949
949
950
950
.. classmethod :: datetime.utcfromtimestamp(timestamp)
951
951
@@ -993,7 +993,7 @@ Other constructors, all class methods:
993
993
Return the :class: `.datetime ` corresponding to the proleptic Gregorian ordinal,
994
994
where January 1 of year 1 has ordinal 1. :exc: `ValueError ` is raised unless
995
995
``1 <= ordinal <= datetime.max.toordinal() ``. The hour, minute, second and
996
- microsecond of the result are all `` 0 `` , and :attr: `.tzinfo ` is ``None ``.
996
+ microsecond of the result are all 0 , and :attr: `.tzinfo ` is ``None ``.
997
997
998
998
999
999
.. classmethod :: datetime.combine(date, time, tzinfo=time.tzinfo)
@@ -1167,7 +1167,7 @@ Instance attributes (read-only):
1167
1167
In ``[0, 1] ``. Used to disambiguate wall times during a repeated interval. (A
1168
1168
repeated interval occurs when clocks are rolled back at the end of daylight saving
1169
1169
time or when the UTC offset for the current zone is decreased for political reasons.)
1170
- The values `` 0 `` and `` 1 `` represent, respectively, the earlier and later of the two
1170
+ The values 0 and 1 represent, respectively, the earlier and later of the two
1171
1171
moments with the same wall time representation.
1172
1172
1173
1173
.. versionadded :: 3.6
@@ -1387,23 +1387,23 @@ Instance methods:
1387
1387
d.weekday(), yday, dst))
1388
1388
1389
1389
where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1 ``
1390
- is the day number within the current year starting with `` 1 `` for January
1390
+ is the day number within the current year starting with 1 for January
1391
1391
1st. The :attr: `~time.struct_time.tm_isdst ` flag of the result is set according to the
1392
1392
:meth: `dst ` method: :attr: `.tzinfo ` is ``None `` or :meth: `dst ` returns
1393
1393
``None ``, :attr: `!tm_isdst ` is set to ``-1 ``; else if :meth: `dst ` returns a
1394
- non-zero value, :attr: `!tm_isdst ` is set to `` 1 `` ; else :attr: `!tm_isdst ` is
1395
- set to `` 0 `` .
1394
+ non-zero value, :attr: `!tm_isdst ` is set to 1 ; else :attr: `!tm_isdst ` is
1395
+ set to 0 .
1396
1396
1397
1397
1398
1398
.. method :: datetime.utctimetuple()
1399
1399
1400
1400
If :class: `.datetime ` instance *d * is naive, this is the same as
1401
- ``d.timetuple() `` except that :attr: `~.time.struct_time.tm_isdst ` is forced to `` 0 `` regardless of what
1401
+ ``d.timetuple() `` except that :attr: `~.time.struct_time.tm_isdst ` is forced to 0 regardless of what
1402
1402
``d.dst() `` returns. DST is never in effect for a UTC time.
1403
1403
1404
1404
If *d * is aware, *d * is normalized to UTC time, by subtracting
1405
1405
``d.utcoffset() ``, and a :class: `time.struct_time ` for the
1406
- normalized time is returned. :attr: `!tm_isdst ` is forced to `` 0 `` . Note
1406
+ normalized time is returned. :attr: `!tm_isdst ` is forced to 0 . Note
1407
1407
that an :exc: `OverflowError ` may be raised if ``d.year `` was
1408
1408
``MINYEAR `` or ``MAXYEAR `` and UTC adjustment spills over a year
1409
1409
boundary.
@@ -1483,15 +1483,15 @@ Instance methods:
1483
1483
1484
1484
Return a string representing the date and time in ISO 8601 format:
1485
1485
1486
- - ``YYYY-MM-DDTHH:MM:SS.ffffff ``, if :attr: `microsecond ` is not `` 0 ``
1487
- - ``YYYY-MM-DDTHH:MM:SS ``, if :attr: `microsecond ` is `` 0 ``
1486
+ - ``YYYY-MM-DDTHH:MM:SS.ffffff ``, if :attr: `microsecond ` is not 0
1487
+ - ``YYYY-MM-DDTHH:MM:SS ``, if :attr: `microsecond ` is 0
1488
1488
1489
1489
If :meth: `utcoffset ` does not return ``None ``, a string is
1490
1490
appended, giving the UTC offset:
1491
1491
1492
1492
- ``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]] ``, if :attr: `microsecond `
1493
- is not `` 0 ``
1494
- - ``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]] ``, if :attr: `microsecond ` is `` 0 ``
1493
+ is not 0
1494
+ - ``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]] ``, if :attr: `microsecond ` is 0
1495
1495
1496
1496
Examples::
1497
1497
@@ -1519,7 +1519,7 @@ Instance methods:
1519
1519
components of the time to include (the default is ``'auto' ``).
1520
1520
It can be one of the following:
1521
1521
1522
- - ``'auto' ``: Same as ``'seconds' `` if :attr: `microsecond ` is `` 0 `` ,
1522
+ - ``'auto' ``: Same as ``'seconds' `` if :attr: `microsecond ` is 0 ,
1523
1523
same as ``'microseconds' `` otherwise.
1524
1524
- ``'hours' ``: Include the :attr: `hour ` in the two-digit ``HH `` format.
1525
1525
- ``'minutes' ``: Include :attr: `hour ` and :attr: `minute ` in ``HH:MM `` format.
@@ -1735,7 +1735,7 @@ day, and subject to adjustment via a :class:`tzinfo` object.
1735
1735
* ``fold in [0, 1] ``.
1736
1736
1737
1737
If an argument outside those ranges is given, :exc: `ValueError ` is raised. All
1738
- default to `` 0 `` except *tzinfo *, which defaults to :const: `None `.
1738
+ default to 0 except *tzinfo *, which defaults to :const: `None `.
1739
1739
1740
1740
Class attributes:
1741
1741
@@ -1790,7 +1790,7 @@ Instance attributes (read-only):
1790
1790
In ``[0, 1] ``. Used to disambiguate wall times during a repeated interval. (A
1791
1791
repeated interval occurs when clocks are rolled back at the end of daylight saving
1792
1792
time or when the UTC offset for the current zone is decreased for political reasons.)
1793
- The values `` 0 `` and `` 1 `` represent, respectively, the earlier and later of the two
1793
+ The values 0 and 1 represent, respectively, the earlier and later of the two
1794
1794
moments with the same wall time representation.
1795
1795
1796
1796
.. versionadded :: 3.6
@@ -1885,16 +1885,16 @@ Instance methods:
1885
1885
1886
1886
Return a string representing the time in ISO 8601 format, one of:
1887
1887
1888
- - ``HH:MM:SS.ffffff ``, if :attr: `microsecond ` is not `` 0 ``
1889
- - ``HH:MM:SS ``, if :attr: `microsecond ` is `` 0 ``
1888
+ - ``HH:MM:SS.ffffff ``, if :attr: `microsecond ` is not 0
1889
+ - ``HH:MM:SS ``, if :attr: `microsecond ` is 0
1890
1890
- ``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]] ``, if :meth: `utcoffset ` does not return ``None ``
1891
- - ``HH:MM:SS+HH:MM[:SS[.ffffff]] ``, if :attr: `microsecond ` is `` 0 `` and :meth: `utcoffset ` does not return ``None ``
1891
+ - ``HH:MM:SS+HH:MM[:SS[.ffffff]] ``, if :attr: `microsecond ` is 0 and :meth: `utcoffset ` does not return ``None ``
1892
1892
1893
1893
The optional argument *timespec * specifies the number of additional
1894
1894
components of the time to include (the default is ``'auto' ``).
1895
1895
It can be one of the following:
1896
1896
1897
- - ``'auto' ``: Same as ``'seconds' `` if :attr: `microsecond ` is `` 0 `` ,
1897
+ - ``'auto' ``: Same as ``'seconds' `` if :attr: `microsecond ` is 0 ,
1898
1898
same as ``'microseconds' `` otherwise.
1899
1899
- ``'hours' ``: Include the :attr: `hour ` in the two-digit ``HH `` format.
1900
1900
- ``'minutes' ``: Include :attr: `hour ` and :attr: `minute ` in ``HH:MM `` format.
@@ -2235,7 +2235,7 @@ to 1:00 (standard time) again. Local times of the form 1:MM are ambiguous.
2235
2235
:meth: `~.datetime.astimezone ` mimics the local clock's behavior by mapping two adjacent UTC
2236
2236
hours into the same local hour then. In the Eastern example, UTC times of the
2237
2237
form 5:MM and 6: MM both map to 1:MM when converted to Eastern, but earlier times
2238
- have the :attr: `~.datetime.fold ` attribute set to `` 0 `` and the later times have it set to `` 1 `` .
2238
+ have the :attr: `~.datetime.fold ` attribute set to 0 and the later times have it set to 1 .
2239
2239
For example, at the Fall back transition of 2016, we get::
2240
2240
2241
2241
>>> u0 = datetime(2016, 11, 6, 4, tzinfo=timezone.utc)
@@ -2561,11 +2561,11 @@ information, which are supported in ``datetime.strptime`` but are discarded by
2561
2561
2562
2562
For :class: `.time ` objects, the format codes for year, month, and day should not
2563
2563
be used, as :class: `!time ` objects have no such values. If they're used anyway,
2564
- ``1900 `` is substituted for the year, and `` 1 `` for the month and day.
2564
+ ``1900 `` is substituted for the year, and 1 for the month and day.
2565
2565
2566
2566
For :class: `date ` objects, the format codes for hours, minutes, seconds, and
2567
2567
microseconds should not be used, as :class: `date ` objects have no such
2568
- values. If they're used anyway, `` 0 `` is substituted for them.
2568
+ values. If they're used anyway, 0 is substituted for them.
2569
2569
2570
2570
For the same reason, handling of format strings containing Unicode code points
2571
2571
that can't be represented in the charset of the current locale is also
0 commit comments