chunk_id
stringlengths
36
36
source
stringclasses
35 values
source_url
stringlengths
0
290
upstream_license
stringclasses
1 value
document_id
stringlengths
36
36
chunk_index
int64
0
324k
retrieved_at
stringclasses
2 values
chunker_version
stringclasses
4 values
content_hash
stringlengths
15
64
content
stringlengths
50
44.7k
namespace
stringclasses
9 values
source_name
stringclasses
35 values
raw_text
stringlengths
50
44.7k
cleaned_text
stringlengths
50
44.7k
tags
stringclasses
49 values
collection_name
stringclasses
11 values
7b229ac1-df34-4751-8426-d611b1874e07
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,661
supabase-export-v2
46bc3119e3fb97f0
is {0:%d}, the {2} is {0:%B}, the {3} is {0:%I:%M%p}.'.format(my_datetime, "day", "month", "time") 'The day is 21, the month is November, the time is 04:30PM.' The example below defines a :class:`tzinfo` subclass capturing time zone information for Kabul, Afghanistan, which used +4 UTC until 1945 and then +4:30 UTC the...
trusted_official_docs
CPython Docs
is {0:%d}, the {2} is {0:%B}, the {3} is {0:%I:%M%p}.'.format(my_datetime, "day", "month", "time") 'The day is 21, the month is November, the time is 04:30PM.' The example below defines a :class:`tzinfo` subclass capturing time zone information for Kabul, Afghanistan, which used +4 UTC until 1945 and then +4:30 UTC the...
is {0:%d}, the {2} is {0:%B}, the {3} is {0:%I:%M%p}.'.format(my_datetime, "day", "month", "time") 'The day is 21, the month is November, the time is 04:30PM.' The example below defines a :class:`tzinfo` subclass capturing time zone information for Kabul, Afghanistan, which used +4 UTC until 1945 and then +4:30 UTC the...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7baba6b7-842c-4939-954c-3ffa3af97b7b
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,818
supabase-export-v2
b57fc17d6458e0de
Return the fixed value specified when the :class:`timezone` instance is constructed. If *name* is not provided in the constructor, the name returned by ``tzname(dt)`` is generated from the value of the ``offset`` as follows. If *offset* is ``timedelta(0)``, the name is "UTC", otherwise it is a string in the format `...
trusted_official_docs
CPython Docs
Return the fixed value specified when the :class:`timezone` instance is constructed. If *name* is not provided in the constructor, the name returned by ``tzname(dt)`` is generated from the value of the ``offset`` as follows. If *offset* is ``timedelta(0)``, the name is "UTC", otherwise it is a string in the format `...
Return the fixed value specified when the :class:`timezone` instance is constructed. If *name* is not provided in the constructor, the name returned by ``tzname(dt)`` is generated from the value of the ``offset`` as follows. If *offset* is ``timedelta(0)``, the name is "UTC", otherwise it is a string in the format `...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7c3cbc4b-2e93-4623-a7a4-7cb8f3d29239
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,751
supabase-export-v2
d4596317559b0ac9
simple concrete subclass of :class:`!tzinfo` which can represent time zones with fixed offset from UTC such as UTC itself or North American EST and EDT. Special requirement for pickling: A :class:`tzinfo` subclass must have an :meth:`~object.__init__` method that can be called with no arguments, otherwise it can be ...
trusted_official_docs
CPython Docs
simple concrete subclass of :class:`!tzinfo` which can represent time zones with fixed offset from UTC such as UTC itself or North American EST and EDT. Special requirement for pickling: A :class:`tzinfo` subclass must have an :meth:`~object.__init__` method that can be called with no arguments, otherwise it can be ...
simple concrete subclass of :class:`!tzinfo` which can represent time zones with fixed offset from UTC such as UTC itself or North American EST and EDT. Special requirement for pickling: A :class:`tzinfo` subclass must have an :meth:`~object.__init__` method that can be called with no arguments, otherwise it can be ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7c6fd297-8582-405d-866e-942b48b99f28
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,457
supabase-export-v2
6b052103d208aa57
*day* arguments are required. *tzinfo* may be ``None``, or an instance of a :class:`tzinfo` subclass. The remaining arguments must be integers in the following ranges: * ``MINYEAR <= year <= MAXYEAR``, * ``1 <= month <= 12``, * ``1 <= day <= number of days in the given month and year``, * ``0 <= hour < 24``, * ``0 ...
trusted_official_docs
CPython Docs
*day* arguments are required. *tzinfo* may be ``None``, or an instance of a :class:`tzinfo` subclass. The remaining arguments must be integers in the following ranges: * ``MINYEAR <= year <= MAXYEAR``, * ``1 <= month <= 12``, * ``1 <= day <= number of days in the given month and year``, * ``0 <= hour < 24``, * ``0 ...
*day* arguments are required. *tzinfo* may be ``None``, or an instance of a :class:`tzinfo` subclass. The remaining arguments must be integers in the following ranges: * ``MINYEAR <= year <= MAXYEAR``, * ``1 <= month <= 12``, * ``1 <= day <= number of days in the given month and year``, * ``0 <= hour < 24``, * ``0 ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7d068c60-32d9-469c-b414-2a94f5c1c661
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,356
supabase-export-v2
81e96228b0949f8d
Return the date corresponding to the proleptic Gregorian *ordinal*, where January 1 of year 1 has ordinal 1. :exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``. For any date ``d``, ``date.fromordinal(d.toordinal()) == d``.
trusted_official_docs
CPython Docs
Return the date corresponding to the proleptic Gregorian *ordinal*, where January 1 of year 1 has ordinal 1. :exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``. For any date ``d``, ``date.fromordinal(d.toordinal()) == d``.
Return the date corresponding to the proleptic Gregorian *ordinal*, where January 1 of year 1 has ordinal 1. :exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``. For any date ``d``, ``date.fromordinal(d.toordinal()) == d``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7d540431-4c7f-4778-a10d-135d048465a8
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,560
supabase-export-v2
e061e86d7d697944
comparands are aware and have different :attr:`~.datetime.tzinfo` attributes, the comparison acts as comparands were first converted to UTC datetimes except that the implementation never overflows. .. versionchanged:: 3.3 Equality comparisons between aware and naive :class:`.datetime` instances don't raise :exc:`Type...
trusted_official_docs
CPython Docs
comparands are aware and have different :attr:`~.datetime.tzinfo` attributes, the comparison acts as comparands were first converted to UTC datetimes except that the implementation never overflows. .. versionchanged:: 3.3 Equality comparisons between aware and naive :class:`.datetime` instances don't raise :exc:`Type...
comparands are aware and have different :attr:`~.datetime.tzinfo` attributes, the comparison acts as comparands were first converted to UTC datetimes except that the implementation never overflows. .. versionchanged:: 3.3 Equality comparisons between aware and naive :class:`.datetime` instances don't raise :exc:`Type...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7d71717f-70df-4aee-912b-50fcc42cb946
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,680
supabase-export-v2
ef5a6de0ff3a5fc9
< 24``, * ``0 <= minute < 60``, * ``0 <= second < 60``, * ``0 <= microsecond < 1000000``, * ``fold in [0, 1]``. If an argument outside those ranges is given, :exc:`ValueError` is raised. All default to 0 except *tzinfo*, which defaults to ``None``.
trusted_official_docs
CPython Docs
< 24``, * ``0 <= minute < 60``, * ``0 <= second < 60``, * ``0 <= microsecond < 1000000``, * ``fold in [0, 1]``. If an argument outside those ranges is given, :exc:`ValueError` is raised. All default to 0 except *tzinfo*, which defaults to ``None``.
< 24``, * ``0 <= minute < 60``, * ``0 <= second < 60``, * ``0 <= microsecond < 1000000``, * ``fold in [0, 1]``. If an argument outside those ranges is given, :exc:`ValueError` is raised. All default to 0 except *tzinfo*, which defaults to ``None``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7e1e72c2-bd55-479b-9296-83a502ec197e
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,504
supabase-export-v2
9894909720b64840
:exc:`ValueError` is raised unless ``1 <= ordinal <= datetime.max.toordinal()``. The hour, minute, second and microsecond of the result are all 0, and :attr:`.tzinfo` is ``None``. .. classmethod:: datetime.combine(date, time, tzinfo=time.tzinfo)
trusted_official_docs
CPython Docs
:exc:`ValueError` is raised unless ``1 <= ordinal <= datetime.max.toordinal()``. The hour, minute, second and microsecond of the result are all 0, and :attr:`.tzinfo` is ``None``. .. classmethod:: datetime.combine(date, time, tzinfo=time.tzinfo)
:exc:`ValueError` is raised unless ``1 <= ordinal <= datetime.max.toordinal()``. The hour, minute, second and microsecond of the result are all 0, and :attr:`.tzinfo` is ``None``. .. classmethod:: datetime.combine(date, time, tzinfo=time.tzinfo)
python, official-docs, cpython, P0
Local_Trusted_Corpus
7fe844f1-942b-42c3-858e-34dcb00d8351
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,557
supabase-export-v2
43b67934e35fc84e
to UTC datetimes except that the implementation never overflows. :class:`.datetime` instances in a repeated interval are never equal to :class:`!datetime` instances in other time zone. (5) *datetime1* is considered less than *datetime2* when *datetime1* precedes *datetime2* in time, taking into account the time zone.
trusted_official_docs
CPython Docs
to UTC datetimes except that the implementation never overflows. :class:`.datetime` instances in a repeated interval are never equal to :class:`!datetime` instances in other time zone. (5) *datetime1* is considered less than *datetime2* when *datetime1* precedes *datetime2* in time, taking into account the time zone.
to UTC datetimes except that the implementation never overflows. :class:`.datetime` instances in a repeated interval are never equal to :class:`!datetime` instances in other time zone. (5) *datetime1* is considered less than *datetime2* when *datetime1* precedes *datetime2* in time, taking into account the time zone.
python, official-docs, cpython, P0
Local_Trusted_Corpus
806a04cf-158e-4bb5-b26e-8da6265682fa
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,752
supabase-export-v2
625f63f58a57847c
with no arguments, otherwise it can be pickled but possibly not unpickled again. This is a technical requirement that may be relaxed in the future. A concrete subclass of :class:`tzinfo` may need to implement the following methods. Exactly which methods are needed depends on the uses made of aware :mod:`!datetime` ob...
trusted_official_docs
CPython Docs
with no arguments, otherwise it can be pickled but possibly not unpickled again. This is a technical requirement that may be relaxed in the future. A concrete subclass of :class:`tzinfo` may need to implement the following methods. Exactly which methods are needed depends on the uses made of aware :mod:`!datetime` ob...
with no arguments, otherwise it can be pickled but possibly not unpickled again. This is a technical requirement that may be relaxed in the future. A concrete subclass of :class:`tzinfo` may need to implement the following methods. Exactly which methods are needed depends on the uses made of aware :mod:`!datetime` ob...
python, official-docs, cpython, P0
Local_Trusted_Corpus
82c88093-1d1b-4579-9e19-6c020989b4cc
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,225
supabase-export-v2
2a7c495304c7c55a
Package `dateutil <https://dateutil.readthedocs.io/en/stable/>`_ Third-party library with expanded time zone and parsing support. Package :pypi:`DateType` Third-party library that introduces distinct static types to for example, allow :term:`static type checkers <static type checker>` to differentiate between naive ...
trusted_official_docs
CPython Docs
Package `dateutil <https://dateutil.readthedocs.io/en/stable/>`_ Third-party library with expanded time zone and parsing support. Package :pypi:`DateType` Third-party library that introduces distinct static types to for example, allow :term:`static type checkers <static type checker>` to differentiate between naive ...
Package `dateutil <https://dateutil.readthedocs.io/en/stable/>`_ Third-party library with expanded time zone and parsing support. Package :pypi:`DateType` Third-party library that introduces distinct static types to for example, allow :term:`static type checkers <static type checker>` to differentiate between naive ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
831fb367-5933-4fe9-9ef6-a974b2fcfca1
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,853
supabase-export-v2
5265cbf15530f1db
\(6) | | | if the object is naive). | | | +-----------+--------------------------------+------------------------+-------+ | ``%%`` | A literal ``'%'`` character. | % | | +-----------+--------------------------------+------------------------+-------+ The ISO 8601 year and ISO 8601 week directives are not interchangeable...
trusted_official_docs
CPython Docs
\(6) | | | if the object is naive). | | | +-----------+--------------------------------+------------------------+-------+ | ``%%`` | A literal ``'%'`` character. | % | | +-----------+--------------------------------+------------------------+-------+ The ISO 8601 year and ISO 8601 week directives are not interchangeable...
\(6) | | | if the object is naive). | | | +-----------+--------------------------------+------------------------+-------+ | ``%%`` | A literal ``'%'`` character. | % | | +-----------+--------------------------------+------------------------+-------+ The ISO 8601 year and ISO 8601 week directives are not interchangeable...
python, official-docs, cpython, P0
Local_Trusted_Corpus
83bc4f4e-9b96-4ff4-bf65-f4f1846de71f
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,651
supabase-export-v2
aaa987fabf4f63de
.. method:: datetime.__format__(format) Same as :meth:`.datetime.strftime`. This makes it possible to specify a format string for a :class:`.datetime` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`datetime.isoformat`.
trusted_official_docs
CPython Docs
.. method:: datetime.__format__(format) Same as :meth:`.datetime.strftime`. This makes it possible to specify a format string for a :class:`.datetime` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`datetime.isoformat`.
.. method:: datetime.__format__(format) Same as :meth:`.datetime.strftime`. This makes it possible to specify a format string for a :class:`.datetime` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`datetime.isoformat`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
843195f2-966f-45f3-850b-bfea18536b60
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,677
supabase-export-v2
1732f34e8cea6eff
A :class:`.time` object represents a (local) time of day, independent of any particular day, and subject to adjustment via a :class:`tzinfo` object. .. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
trusted_official_docs
CPython Docs
A :class:`.time` object represents a (local) time of day, independent of any particular day, and subject to adjustment via a :class:`tzinfo` object. .. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
A :class:`.time` object represents a (local) time of day, independent of any particular day, and subject to adjustment via a :class:`tzinfo` object. .. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
python, official-docs, cpython, P0
Local_Trusted_Corpus
851c6136-ddb7-47b9-a8c4-2a589b5ebd45
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,659
supabase-export-v2
6f5f7e91f365fe92
0 # second 1 # weekday (0 = Monday) 325 # number of days since 1st January -1 # dst - method tzinfo.dst() returned None >>> # Date in ISO format >>> ic = my_datetime.isocalendar() >>> for it in ic: # doctest: +SKIP ... print(it) ... 2006 # ISO year 47 # ISO week 2 # ISO weekday
trusted_official_docs
CPython Docs
0 # second 1 # weekday (0 = Monday) 325 # number of days since 1st January -1 # dst - method tzinfo.dst() returned None >>> # Date in ISO format >>> ic = my_datetime.isocalendar() >>> for it in ic: # doctest: +SKIP ... print(it) ... 2006 # ISO year 47 # ISO week 2 # ISO weekday
0 # second 1 # weekday (0 = Monday) 325 # number of days since 1st January -1 # dst - method tzinfo.dst() returned None >>> # Date in ISO format >>> ic = my_datetime.isocalendar() >>> for it in ic: # doctest: +SKIP ... print(it) ... 2006 # ISO year 47 # ISO week 2 # ISO weekday
python, official-docs, cpython, P0
Local_Trusted_Corpus
85dc8444-4b31-4a91-bd1e-3448d4cfcdab
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,425
supabase-export-v2
196079016ef5a84d
>>> import datetime as dt >>> dt.date(2003, 12, 29).isocalendar() datetime.IsoCalendarDate(year=2004, week=1, weekday=1) >>> dt.date(2004, 1, 4).isocalendar() datetime.IsoCalendarDate(year=2004, week=1, weekday=7) .. versionchanged:: 3.9 Result changed from a tuple to a :term:`named tuple`.
trusted_official_docs
CPython Docs
>>> import datetime as dt >>> dt.date(2003, 12, 29).isocalendar() datetime.IsoCalendarDate(year=2004, week=1, weekday=1) >>> dt.date(2004, 1, 4).isocalendar() datetime.IsoCalendarDate(year=2004, week=1, weekday=7) .. versionchanged:: 3.9 Result changed from a tuple to a :term:`named tuple`.
>>> import datetime as dt >>> dt.date(2003, 12, 29).isocalendar() datetime.IsoCalendarDate(year=2004, week=1, weekday=1) >>> dt.date(2004, 1, 4).isocalendar() datetime.IsoCalendarDate(year=2004, week=1, weekday=7) .. versionchanged:: 3.9 Result changed from a tuple to a :term:`named tuple`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
86cdbbbb-357c-4933-8705-380a10050d16
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,553
supabase-export-v2
fff76835c24012b0
ignored, and the result is a :class:`timedelta` object ``t`` such that ``datetime2 + t == datetime1``. No time zone adjustments are done in this case. If both are aware and have different :attr:`~.datetime.tzinfo` attributes, ``a-b`` acts as if ``a`` and ``b`` were first converted to naive UTC datetimes. The result i...
trusted_official_docs
CPython Docs
ignored, and the result is a :class:`timedelta` object ``t`` such that ``datetime2 + t == datetime1``. No time zone adjustments are done in this case. If both are aware and have different :attr:`~.datetime.tzinfo` attributes, ``a-b`` acts as if ``a`` and ``b`` were first converted to naive UTC datetimes. The result i...
ignored, and the result is a :class:`timedelta` object ``t`` such that ``datetime2 + t == datetime1``. No time zone adjustments are done in this case. If both are aware and have different :attr:`~.datetime.tzinfo` attributes, ``a-b`` acts as if ``a`` and ``b`` were first converted to naive UTC datetimes. The result i...
python, official-docs, cpython, P0
Local_Trusted_Corpus
870bab00-ec89-4dc2-85cf-795732e6a9c4
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,715
supabase-export-v2
64bea0ed61ee644f
with specified parameters updated. Note that ``tzinfo=None`` can be specified to create a naive :class:`!time` from an aware :class:`!time`, without conversion of the time data. :class:`.time` objects are also supported by generic function :func:`copy.replace`.
trusted_official_docs
CPython Docs
with specified parameters updated. Note that ``tzinfo=None`` can be specified to create a naive :class:`!time` from an aware :class:`!time`, without conversion of the time data. :class:`.time` objects are also supported by generic function :func:`copy.replace`.
with specified parameters updated. Note that ``tzinfo=None`` can be specified to create a naive :class:`!time` from an aware :class:`!time`, without conversion of the time data. :class:`.time` objects are also supported by generic function :func:`copy.replace`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
877e3479-4054-4329-b123-27ebee6a92f6
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,283
supabase-export-v2
54df5524863c0451
... microseconds=10, ... milliseconds=29000, ... minutes=5, ... hours=8, ... weeks=2 ... ) >>> # Only days, seconds, and microseconds remain >>> delta datetime.timedelta(days=64, seconds=29156, microseconds=10) .. tip:: ``import datetime as dt`` instead of ``import datetime`` or ``from datetime import datetime`` to a...
trusted_official_docs
CPython Docs
... microseconds=10, ... milliseconds=29000, ... minutes=5, ... hours=8, ... weeks=2 ... ) >>> # Only days, seconds, and microseconds remain >>> delta datetime.timedelta(days=64, seconds=29156, microseconds=10) .. tip:: ``import datetime as dt`` instead of ``import datetime`` or ``from datetime import datetime`` to a...
... microseconds=10, ... milliseconds=29000, ... minutes=5, ... hours=8, ... weeks=2 ... ) >>> # Only days, seconds, and microseconds remain >>> delta datetime.timedelta(days=64, seconds=29156, microseconds=10) .. tip:: ``import datetime as dt`` instead of ``import datetime`` or ``from datetime import datetime`` to a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
89b4b684-37af-4fe6-97fa-93051e922797
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,856
supabase-export-v2
2bd73a5165497338
\(6) | | | ``±HH:MM[:SS[.ffffff]]`` | -04:00, +10:30, | | | | (empty string if the object is | +06:34:15, | | | | naive). | -03:07:12.345216 | | +-----------+--------------------------------+------------------------+-------+
trusted_official_docs
CPython Docs
\(6) | | | ``±HH:MM[:SS[.ffffff]]`` | -04:00, +10:30, | | | | (empty string if the object is | +06:34:15, | | | | naive). | -03:07:12.345216 | | +-----------+--------------------------------+------------------------+-------+
\(6) | | | ``±HH:MM[:SS[.ffffff]]`` | -04:00, +10:30, | | | | (empty string if the object is | +06:34:15, | | | | naive). | -03:07:12.345216 | | +-----------+--------------------------------+------------------------+-------+
python, official-docs, cpython, P0
Local_Trusted_Corpus
8b6d7626-a739-4bf9-8ccc-4872eabb2c8e
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,657
supabase-export-v2
8a8ba416e0dc4634
doctest: +SKIP datetime.datetime(2007, 12, 6, 16, 29, 43, 79043) # GMT +1 >>> dt.datetime.now(dt.timezone.utc) # doctest: +SKIP datetime.datetime(2007, 12, 6, 15, 29, 43, 79060, tzinfo=datetime.timezone.utc) >>> # Using datetime.strptime() >>> my_datetime = dt.datetime.strptime("21/11/06 16:30", "%d/%m/%y %H:%M") >>>...
trusted_official_docs
CPython Docs
doctest: +SKIP datetime.datetime(2007, 12, 6, 16, 29, 43, 79043) # GMT +1 >>> dt.datetime.now(dt.timezone.utc) # doctest: +SKIP datetime.datetime(2007, 12, 6, 15, 29, 43, 79060, tzinfo=datetime.timezone.utc) >>> # Using datetime.strptime() >>> my_datetime = dt.datetime.strptime("21/11/06 16:30", "%d/%m/%y %H:%M") >>>...
doctest: +SKIP datetime.datetime(2007, 12, 6, 16, 29, 43, 79043) # GMT +1 >>> dt.datetime.now(dt.timezone.utc) # doctest: +SKIP datetime.datetime(2007, 12, 6, 15, 29, 43, 79060, tzinfo=datetime.timezone.utc) >>> # Using datetime.strptime() >>> my_datetime = dt.datetime.strptime("21/11/06 16:30", "%d/%m/%y %H:%M") >>>...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8c4258d5-d275-4a7e-b159-8cfa56d2baa7
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,579
supabase-export-v2
48ab221532d4afeb
the same UTC time as *self*: after ``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` will have the same date and time data as ``dt - dt.utcoffset()``. If you merely want to attach a :class:`timezone` object *tz* to a datetime *dt* without adjustment of date and time data, use ``dt.replace(tzinfo=tz)``. If you ...
trusted_official_docs
CPython Docs
the same UTC time as *self*: after ``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` will have the same date and time data as ``dt - dt.utcoffset()``. If you merely want to attach a :class:`timezone` object *tz* to a datetime *dt* without adjustment of date and time data, use ``dt.replace(tzinfo=tz)``. If you ...
the same UTC time as *self*: after ``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` will have the same date and time data as ``dt - dt.utcoffset()``. If you merely want to attach a :class:`timezone` object *tz* to a datetime *dt* without adjustment of date and time data, use ``dt.replace(tzinfo=tz)``. If you ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8d36abb3-1cf8-428a-a196-a9e35d179c27
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,369
supabase-export-v2
fb7f8313d5d450b2
date(*(time.strptime(date_string, format)[0:3])) :exc:`ValueError` is raised if the date_string and format can't be parsed by :func:`time.strptime` or if it returns a value which isn't a time tuple. See also :ref:`strftime-strptime-behavior` and :meth:`date.fromisoformat`.
trusted_official_docs
CPython Docs
date(*(time.strptime(date_string, format)[0:3])) :exc:`ValueError` is raised if the date_string and format can't be parsed by :func:`time.strptime` or if it returns a value which isn't a time tuple. See also :ref:`strftime-strptime-behavior` and :meth:`date.fromisoformat`.
date(*(time.strptime(date_string, format)[0:3])) :exc:`ValueError` is raised if the date_string and format can't be parsed by :func:`time.strptime` or if it returns a value which isn't a time tuple. See also :ref:`strftime-strptime-behavior` and :meth:`date.fromisoformat`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8e02a02b-6dca-4fa4-92cf-42a406ccee5a
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,572
supabase-export-v2
f792545e31658489
parameters updated. Note that ``tzinfo=None`` can be specified to create a naive datetime from an aware datetime with no conversion of date and time data. :class:`.datetime` objects are also supported by generic function :func:`copy.replace`.
trusted_official_docs
CPython Docs
parameters updated. Note that ``tzinfo=None`` can be specified to create a naive datetime from an aware datetime with no conversion of date and time data. :class:`.datetime` objects are also supported by generic function :func:`copy.replace`.
parameters updated. Note that ``tzinfo=None`` can be specified to create a naive datetime from an aware datetime with no conversion of date and time data. :class:`.datetime` objects are also supported by generic function :func:`copy.replace`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8e756286-7250-4f86-8b46-436db9ebc22f
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,397
supabase-export-v2
1b1f16daaed1d989
:class:`!date` objects that are not also :class:`.datetime` instances are never equal to :class:`!datetime` objects, even if they represent the same date. (5) *date1* is considered less than *date2* when *date1* precedes *date2* in time. In other words, ``date1 < date2`` if and only if ``date1.toordinal() < date2.too...
trusted_official_docs
CPython Docs
:class:`!date` objects that are not also :class:`.datetime` instances are never equal to :class:`!datetime` objects, even if they represent the same date. (5) *date1* is considered less than *date2* when *date1* precedes *date2* in time. In other words, ``date1 < date2`` if and only if ``date1.toordinal() < date2.too...
:class:`!date` objects that are not also :class:`.datetime` instances are never equal to :class:`!datetime` objects, even if they represent the same date. (5) *date1* is considered less than *date2* when *date1* precedes *date2* in time. In other words, ``date1 < date2`` if and only if ``date1.toordinal() < date2.too...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8eccbc18-2312-484b-9702-56b4e3f50a76
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,658
supabase-export-v2
bd487ffadbe191d7
>>> # Using datetime.strptime() >>> my_datetime = dt.datetime.strptime("21/11/06 16:30", "%d/%m/%y %H:%M") >>> my_datetime datetime.datetime(2006, 11, 21, 16, 30) >>> # Using datetime.timetuple() to get tuple of all attributes >>> tt = my_datetime.timetuple() >>> for it in tt: # doctest: +SKIP ... print(it) ... 200...
trusted_official_docs
CPython Docs
>>> # Using datetime.strptime() >>> my_datetime = dt.datetime.strptime("21/11/06 16:30", "%d/%m/%y %H:%M") >>> my_datetime datetime.datetime(2006, 11, 21, 16, 30) >>> # Using datetime.timetuple() to get tuple of all attributes >>> tt = my_datetime.timetuple() >>> for it in tt: # doctest: +SKIP ... print(it) ... 200...
>>> # Using datetime.strptime() >>> my_datetime = dt.datetime.strptime("21/11/06 16:30", "%d/%m/%y %H:%M") >>> my_datetime datetime.datetime(2006, 11, 21, 16, 30) >>> # Using datetime.timetuple() to get tuple of all attributes >>> tt = my_datetime.timetuple() >>> for it in tt: # doctest: +SKIP ... print(it) ... 200...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8efa4350-113d-4736-ad4e-ac167a57767a
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,458
supabase-export-v2
021523e381509939
< 24``, * ``0 <= minute < 60``, * ``0 <= second < 60``, * ``0 <= microsecond < 1000000``, * ``fold in [0, 1]``. If an argument outside those ranges is given, :exc:`ValueError` is raised.
trusted_official_docs
CPython Docs
< 24``, * ``0 <= minute < 60``, * ``0 <= second < 60``, * ``0 <= microsecond < 1000000``, * ``fold in [0, 1]``. If an argument outside those ranges is given, :exc:`ValueError` is raised.
< 24``, * ``0 <= minute < 60``, * ``0 <= second < 60``, * ``0 <= microsecond < 1000000``, * ``fold in [0, 1]``. If an argument outside those ranges is given, :exc:`ValueError` is raised.
python, official-docs, cpython, P0
Local_Trusted_Corpus
91089f7f-3cfc-43d5-b253-fd2b1a52be6f
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,246
supabase-export-v2
3bb80909b56fd644
.. class:: time :noindex: An idealized time, independent of any particular day, assuming that every day has exactly 24\*60\*60 seconds. (There is no notion of "leap seconds" here.) Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:`microsecond`, and :attr:`.tzinfo`.
trusted_official_docs
CPython Docs
.. class:: time :noindex: An idealized time, independent of any particular day, assuming that every day has exactly 24\*60\*60 seconds. (There is no notion of "leap seconds" here.) Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:`microsecond`, and :attr:`.tzinfo`.
.. class:: time :noindex: An idealized time, independent of any particular day, assuming that every day has exactly 24\*60\*60 seconds. (There is no notion of "leap seconds" here.) Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:`microsecond`, and :attr:`.tzinfo`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
91603e93-baa7-4886-8cf1-639e14b8ab96
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,695
supabase-export-v2
cad527fbb3231686
:class:`.time` objects support equality and order comparisons, where ``a`` is considered less than ``b`` when ``a`` precedes ``b`` in time. Naive and aware :class:`!time` objects are never equal. Order comparison between naive and aware :class:`!time` objects raises :exc:`TypeError`.
trusted_official_docs
CPython Docs
:class:`.time` objects support equality and order comparisons, where ``a`` is considered less than ``b`` when ``a`` precedes ``b`` in time. Naive and aware :class:`!time` objects are never equal. Order comparison between naive and aware :class:`!time` objects raises :exc:`TypeError`.
:class:`.time` objects support equality and order comparisons, where ``a`` is considered less than ``b`` when ``a`` precedes ``b`` in time. Naive and aware :class:`!time` objects are never equal. Order comparison between naive and aware :class:`!time` objects raises :exc:`TypeError`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
93df2540-c87e-439f-88f3-c6a8c4c58b4d
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,703
supabase-export-v2
0495b75e35b64fc7
Return a :class:`.time` corresponding to a *time_string* in any valid ISO 8601 format, with the following exceptions: 1. Time zone offsets may have fractional seconds. 2. The leading ``T``, normally required in cases where there may be ambiguity between a date and a time, is not required. 3. Fractional seconds may hav...
trusted_official_docs
CPython Docs
Return a :class:`.time` corresponding to a *time_string* in any valid ISO 8601 format, with the following exceptions: 1. Time zone offsets may have fractional seconds. 2. The leading ``T``, normally required in cases where there may be ambiguity between a date and a time, is not required. 3. Fractional seconds may hav...
Return a :class:`.time` corresponding to a *time_string* in any valid ISO 8601 format, with the following exceptions: 1. Time zone offsets may have fractional seconds. 2. The leading ``T``, normally required in cases where there may be ambiguity between a date and a time, is not required. 3. Fractional seconds may hav...
python, official-docs, cpython, P0
Local_Trusted_Corpus
93fc6c2a-26a4-4b78-824d-7438cb4b669b
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,596
supabase-export-v2
4bb0f1285dd9beb3
time.struct_time((d.year, d.month, d.day, d.hour, d.minute, d.second, d.weekday(), yday, dst)) where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the day number within the current year starting with 1 for January 1st. The :attr:`~time.struct_time.tm_isdst` flag of the result is set according to th...
trusted_official_docs
CPython Docs
time.struct_time((d.year, d.month, d.day, d.hour, d.minute, d.second, d.weekday(), yday, dst)) where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the day number within the current year starting with 1 for January 1st. The :attr:`~time.struct_time.tm_isdst` flag of the result is set according to th...
time.struct_time((d.year, d.month, d.day, d.hour, d.minute, d.second, d.weekday(), yday, dst)) where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the day number within the current year starting with 1 for January 1st. The :attr:`~time.struct_time.tm_isdst` flag of the result is set according to th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
94e26c85-72aa-4a26-a95f-02a8e981dc98
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,513
supabase-export-v2
6abfc13dfbc8eef0
23, 283000) >>> dt.datetime.fromisoformat('2011-11-04 00:05:23.283+00:00') datetime.datetime(2011, 11, 4, 0, 5, 23, 283000, tzinfo=datetime.timezone.utc) >>> dt.datetime.fromisoformat('2011-11-04T00:05:23+04:00') # doctest: +NORMALIZE_WHITESPACE datetime.datetime(2011, 11, 4, 0, 5, 23, tzinfo=datetime.timezone(datetime...
trusted_official_docs
CPython Docs
23, 283000) >>> dt.datetime.fromisoformat('2011-11-04 00:05:23.283+00:00') datetime.datetime(2011, 11, 4, 0, 5, 23, 283000, tzinfo=datetime.timezone.utc) >>> dt.datetime.fromisoformat('2011-11-04T00:05:23+04:00') # doctest: +NORMALIZE_WHITESPACE datetime.datetime(2011, 11, 4, 0, 5, 23, tzinfo=datetime.timezone(datetime...
23, 283000) >>> dt.datetime.fromisoformat('2011-11-04 00:05:23.283+00:00') datetime.datetime(2011, 11, 4, 0, 5, 23, 283000, tzinfo=datetime.timezone.utc) >>> dt.datetime.fromisoformat('2011-11-04T00:05:23+04:00') # doctest: +NORMALIZE_WHITESPACE datetime.datetime(2011, 11, 4, 0, 5, 23, tzinfo=datetime.timezone(datetime...
python, official-docs, cpython, P0
Local_Trusted_Corpus
963e58bf-9ef4-4231-9b9a-3e5b2a6cc64d
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,503
supabase-export-v2
955688e0bfa5bb8e
.. classmethod:: datetime.fromordinal(ordinal) Return the :class:`.datetime` corresponding to the proleptic Gregorian ordinal, where January 1 of year 1 has ordinal 1. :exc:`ValueError` is raised unless ``1 <= ordinal <= datetime.max.toordinal()``. The hour, minute, second and microsecond of the result are all 0, an...
trusted_official_docs
CPython Docs
.. classmethod:: datetime.fromordinal(ordinal) Return the :class:`.datetime` corresponding to the proleptic Gregorian ordinal, where January 1 of year 1 has ordinal 1. :exc:`ValueError` is raised unless ``1 <= ordinal <= datetime.max.toordinal()``. The hour, minute, second and microsecond of the result are all 0, an...
.. classmethod:: datetime.fromordinal(ordinal) Return the :class:`.datetime` corresponding to the proleptic Gregorian ordinal, where January 1 of year 1 has ordinal 1. :exc:`ValueError` is raised unless ``1 <= ordinal <= datetime.max.toordinal()``. The hour, minute, second and microsecond of the result are all 0, an...
python, official-docs, cpython, P0
Local_Trusted_Corpus
964bcae6-5c94-42cc-b755-575c977f39be
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,498
supabase-export-v2
4eed5eadfe71db13
to represent times in UTC. As such, the recommended way to create an object representing a specific timestamp in UTC is by calling ``datetime.fromtimestamp(timestamp, tz=timezone.utc)``. .. versionchanged:: 3.3 Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is out of the range of values supp...
trusted_official_docs
CPython Docs
to represent times in UTC. As such, the recommended way to create an object representing a specific timestamp in UTC is by calling ``datetime.fromtimestamp(timestamp, tz=timezone.utc)``. .. versionchanged:: 3.3 Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is out of the range of values supp...
to represent times in UTC. As such, the recommended way to create an object representing a specific timestamp in UTC is by calling ``datetime.fromtimestamp(timestamp, tz=timezone.utc)``. .. versionchanged:: 3.3 Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is out of the range of values supp...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9766de7c-8205-4194-a7c2-9ed84d8667ce
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,765
supabase-export-v2
8c2e104b91ea116d
``tz.utcoffset(dt) - tz.dst(dt)`` must return the same result for every :class:`.datetime` *dt* with ``dt.tzinfo == tz``. For sane :class:`!tzinfo` subclasses, this expression yields the time zone's "standard offset", which should not depend on the date or the time, but only on geographic location. The implementatio...
trusted_official_docs
CPython Docs
``tz.utcoffset(dt) - tz.dst(dt)`` must return the same result for every :class:`.datetime` *dt* with ``dt.tzinfo == tz``. For sane :class:`!tzinfo` subclasses, this expression yields the time zone's "standard offset", which should not depend on the date or the time, but only on geographic location. The implementatio...
``tz.utcoffset(dt) - tz.dst(dt)`` must return the same result for every :class:`.datetime` *dt* with ``dt.tzinfo == tz``. For sane :class:`!tzinfo` subclasses, this expression yields the time zone's "standard offset", which should not depend on the date or the time, but only on geographic location. The implementatio...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9771921e-9ba6-4de7-8e44-c5824a18c386
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,756
supabase-export-v2
1993c5a01426710e
and ``timedelta(hours=24)`` (the magnitude of the offset must be less than one day). Most implementations of :meth:`utcoffset` will probably look like one of these two:: return CONSTANT # fixed-offset class return CONSTANT + self.dst(dt) # daylight-aware class
trusted_official_docs
CPython Docs
and ``timedelta(hours=24)`` (the magnitude of the offset must be less than one day). Most implementations of :meth:`utcoffset` will probably look like one of these two:: return CONSTANT # fixed-offset class return CONSTANT + self.dst(dt) # daylight-aware class
and ``timedelta(hours=24)`` (the magnitude of the offset must be less than one day). Most implementations of :meth:`utcoffset` will probably look like one of these two:: return CONSTANT # fixed-offset class return CONSTANT + self.dst(dt) # daylight-aware class
python, official-docs, cpython, P0
Local_Trusted_Corpus
98d1fd68-4589-43e1-92d2-bd85841bb512
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,441
supabase-export-v2
9afb94b7ec6822c8
it possible to specify a format string for a :class:`.date` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`date.isoformat`. Examples of usage: :class:`!date` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
trusted_official_docs
CPython Docs
it possible to specify a format string for a :class:`.date` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`date.isoformat`. Examples of usage: :class:`!date` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
it possible to specify a format string for a :class:`.date` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`date.isoformat`. Examples of usage: :class:`!date` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python, official-docs, cpython, P0
Local_Trusted_Corpus
9a8de30a-7724-4b94-991a-2d3a32fd3b87
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,610
supabase-export-v2
4e16d8bb8ee90a1b
.. note:: There is no method to obtain the POSIX timestamp directly from a naive :class:`.datetime` instance representing UTC time. If your application uses this convention and your system time zone is not set to UTC, you can obtain the POSIX timestamp by supplying ``tzinfo=timezone.utc``::
trusted_official_docs
CPython Docs
.. note:: There is no method to obtain the POSIX timestamp directly from a naive :class:`.datetime` instance representing UTC time. If your application uses this convention and your system time zone is not set to UTC, you can obtain the POSIX timestamp by supplying ``tzinfo=timezone.utc``::
.. note:: There is no method to obtain the POSIX timestamp directly from a naive :class:`.datetime` instance representing UTC time. If your application uses this convention and your system time zone is not set to UTC, you can obtain the POSIX timestamp by supplying ``tzinfo=timezone.utc``::
python, official-docs, cpython, P0
Local_Trusted_Corpus
9ad7523c-ae77-43ae-9c8f-a6366eb10531
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,771
supabase-export-v2
231d94363e0b0c53
to set dston and dstoff to the time zone's DST # transition times based on the input when.year, and expressed # in standard local time. if dston <= when.replace(tzinfo=None) < dstoff: return dt.timedelta(hours=1) else: return dt.timedelta(0)
trusted_official_docs
CPython Docs
to set dston and dstoff to the time zone's DST # transition times based on the input when.year, and expressed # in standard local time. if dston <= when.replace(tzinfo=None) < dstoff: return dt.timedelta(hours=1) else: return dt.timedelta(0)
to set dston and dstoff to the time zone's DST # transition times based on the input when.year, and expressed # in standard local time. if dston <= when.replace(tzinfo=None) < dstoff: return dt.timedelta(hours=1) else: return dt.timedelta(0)
python, official-docs, cpython, P0
Local_Trusted_Corpus
9b44443f-ad35-4092-b710-b596baeb7d8e
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,898
supabase-export-v2
8b661963f177a447
with the :meth:`~.datetime.strptime` method, ``%U`` and ``%W`` are only used in calculations when the day of the week and the calendar year (``%Y``) are specified. (8) Similar to ``%U`` and ``%W``, ``%V`` is only used in calculations when the day of the week and the ISO year (``%G``) are specified in a :meth:`~.date...
trusted_official_docs
CPython Docs
with the :meth:`~.datetime.strptime` method, ``%U`` and ``%W`` are only used in calculations when the day of the week and the calendar year (``%Y``) are specified. (8) Similar to ``%U`` and ``%W``, ``%V`` is only used in calculations when the day of the week and the ISO year (``%G``) are specified in a :meth:`~.date...
with the :meth:`~.datetime.strptime` method, ``%U`` and ``%W`` are only used in calculations when the day of the week and the calendar year (``%Y``) are specified. (8) Similar to ``%U`` and ``%W``, ``%V`` is only used in calculations when the day of the week and the ISO year (``%G``) are specified in a :meth:`~.date...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9b7e0ecb-d946-4a0a-9b77-4df78961b07a
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,852
supabase-export-v2
12a16fd77d3fe73e
number. | | | +-----------+--------------------------------+------------------------+-------+ | ``%Y`` | Year with century as a decimal | 0001, 0002, ..., 2013, | \(2) | | | number. | 2014, ..., 9998, 9999 | | +-----------+--------------------------------+------------------------+-------+ | ``%z`` | UTC offset in the f...
trusted_official_docs
CPython Docs
number. | | | +-----------+--------------------------------+------------------------+-------+ | ``%Y`` | Year with century as a decimal | 0001, 0002, ..., 2013, | \(2) | | | number. | 2014, ..., 9998, 9999 | | +-----------+--------------------------------+------------------------+-------+ | ``%z`` | UTC offset in the f...
number. | | | +-----------+--------------------------------+------------------------+-------+ | ``%Y`` | Year with century as a decimal | 0001, 0002, ..., 2013, | \(2) | | | number. | 2014, ..., 9998, 9999 | | +-----------+--------------------------------+------------------------+-------+ | ``%z`` | UTC offset in the f...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9b9db07d-2f4d-42eb-9c08-30863d79dc1a
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,884
supabase-export-v2
60836d286ade7fa3
(4) Unlike the :mod:`time` module, the :mod:`!datetime` module does not support leap seconds. (5) When used with the :meth:`~.datetime.strptime` method, the ``%f`` directive accepts from one to six digits and zero pads on the right. ``%f`` is an extension to the set of format characters in the C standard (but imple...
trusted_official_docs
CPython Docs
(4) Unlike the :mod:`time` module, the :mod:`!datetime` module does not support leap seconds. (5) When used with the :meth:`~.datetime.strptime` method, the ``%f`` directive accepts from one to six digits and zero pads on the right. ``%f`` is an extension to the set of format characters in the C standard (but imple...
(4) Unlike the :mod:`time` module, the :mod:`!datetime` module does not support leap seconds. (5) When used with the :meth:`~.datetime.strptime` method, the ``%f`` directive accepts from one to six digits and zero pads on the right. ``%f`` is an extension to the set of format characters in the C standard (but imple...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9c6ffea8-0dc4-4265-814e-5fbe148474c1
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,869
supabase-export-v2
979e266928b4afb3
.. doctest:: >>> import datetime as dt >>> value = "2/29" >>> dt.datetime.strptime(value, "%m/%d") Traceback (most recent call last): ... ValueError: day 29 must be in range 1..28 for month 2 in year 1900 >>> dt.datetime.strptime(f"1904 {value}", "%Y %m/%d") datetime.datetime(1904, 2, 29, 0, 0)
trusted_official_docs
CPython Docs
.. doctest:: >>> import datetime as dt >>> value = "2/29" >>> dt.datetime.strptime(value, "%m/%d") Traceback (most recent call last): ... ValueError: day 29 must be in range 1..28 for month 2 in year 1900 >>> dt.datetime.strptime(f"1904 {value}", "%Y %m/%d") datetime.datetime(1904, 2, 29, 0, 0)
.. doctest:: >>> import datetime as dt >>> value = "2/29" >>> dt.datetime.strptime(value, "%m/%d") Traceback (most recent call last): ... ValueError: day 29 must be in range 1..28 for month 2 in year 1900 >>> dt.datetime.strptime(f"1904 {value}", "%Y %m/%d") datetime.datetime(1904, 2, 29, 0, 0)
python, official-docs, cpython, P0
Local_Trusted_Corpus
9cc313bd-e7c1-4480-9346-5d17fac24190
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,749
supabase-export-v2
30f2d72bf2e8cf50
:term:`abstract base class`, meaning that this class should not be instantiated directly. Define a subclass of :class:`tzinfo` to capture information about a particular time zone. An instance of (a concrete subclass of) :class:`tzinfo` can be passed to the constructors for :class:`.datetime` and :class:`.time` objects...
trusted_official_docs
CPython Docs
:term:`abstract base class`, meaning that this class should not be instantiated directly. Define a subclass of :class:`tzinfo` to capture information about a particular time zone. An instance of (a concrete subclass of) :class:`tzinfo` can be passed to the constructors for :class:`.datetime` and :class:`.time` objects...
:term:`abstract base class`, meaning that this class should not be instantiated directly. Define a subclass of :class:`tzinfo` to capture information about a particular time zone. An instance of (a concrete subclass of) :class:`tzinfo` can be passed to the constructors for :class:`.datetime` and :class:`.time` objects...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9d330ec1-47a7-48be-999c-53b87a423028
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,841
supabase-export-v2
dddafac9e07e8ec1
| Dezember (de_DE) | | +-----------+--------------------------------+------------------------+-------+ | ``%c`` | Locale's appropriate date and || Tue Aug 16 21:30:00 | \(1) | | | time representation. | 1988 (en_US); | | | | || Di 16 Aug 21:30:00 | | | | | 1988 (de_DE) | | +-----------+--------------------------------+...
trusted_official_docs
CPython Docs
| Dezember (de_DE) | | +-----------+--------------------------------+------------------------+-------+ | ``%c`` | Locale's appropriate date and || Tue Aug 16 21:30:00 | \(1) | | | time representation. | 1988 (en_US); | | | | || Di 16 Aug 21:30:00 | | | | | 1988 (de_DE) | | +-----------+--------------------------------+...
| Dezember (de_DE) | | +-----------+--------------------------------+------------------------+-------+ | ``%c`` | Locale's appropriate date and || Tue Aug 16 21:30:00 | \(1) | | | time representation. | 1988 (en_US); | | | | || Di 16 Aug 21:30:00 | | | | | 1988 (de_DE) | | +-----------+--------------------------------+...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9e34889a-cd82-48df-a136-fcdb87ba75ff
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,755
supabase-export-v2
ed92086a6ec8b017
local time from UTC, as a :class:`timedelta` object that is positive east of UTC. If local time is west of UTC, this should be negative. This represents the *total* offset from UTC; for example, if a :class:`tzinfo` object represents both time zone and DST adjustments, :meth:`utcoffset` should return their sum. If th...
trusted_official_docs
CPython Docs
local time from UTC, as a :class:`timedelta` object that is positive east of UTC. If local time is west of UTC, this should be negative. This represents the *total* offset from UTC; for example, if a :class:`tzinfo` object represents both time zone and DST adjustments, :meth:`utcoffset` should return their sum. If th...
local time from UTC, as a :class:`timedelta` object that is positive east of UTC. If local time is west of UTC, this should be negative. This represents the *total* offset from UTC; for example, if a :class:`tzinfo` object represents both time zone and DST adjustments, :meth:`utcoffset` should return their sum. If th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9e35cf26-7dbf-4dbc-b876-3d3c5c0fca43
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,440
supabase-export-v2
166067e06411a60a
.. method:: date.__format__(format) Same as :meth:`.date.strftime`. This makes it possible to specify a format string for a :class:`.date` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`date.isoformat`.
trusted_official_docs
CPython Docs
.. method:: date.__format__(format) Same as :meth:`.date.strftime`. This makes it possible to specify a format string for a :class:`.date` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`date.isoformat`.
.. method:: date.__format__(format) Same as :meth:`.date.strftime`. This makes it possible to specify a format string for a :class:`.date` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`date.isoformat`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a0a967f6-72cd-49c7-82af-ded5910c60ca
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,819
supabase-export-v2
24ef8262abffe713
is a string in the format ``UTC±HH:MM``, where ± is the sign of ``offset``, HH and MM are two digits of ``offset.hours`` and ``offset.minutes`` respectively. .. versionchanged:: 3.6 Name generated from ``offset=timedelta(0)`` is now plain ``'UTC'``, not ``'UTC+00:00'``.
trusted_official_docs
CPython Docs
is a string in the format ``UTC±HH:MM``, where ± is the sign of ``offset``, HH and MM are two digits of ``offset.hours`` and ``offset.minutes`` respectively. .. versionchanged:: 3.6 Name generated from ``offset=timedelta(0)`` is now plain ``'UTC'``, not ``'UTC+00:00'``.
is a string in the format ``UTC±HH:MM``, where ± is the sign of ``offset``, HH and MM are two digits of ``offset.hours`` and ``offset.minutes`` respectively. .. versionchanged:: 3.6 Name generated from ``offset=timedelta(0)`` is now plain ``'UTC'``, not ``'UTC+00:00'``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a10025e7-b0d2-492a-8f4b-4567d82319e4
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,865
supabase-export-v2
d8bb55844ac91449
example, with ``%Y%m%d``, the string ``2026111`` may be parsed either as ``2026-11-01`` or as ``2026-01-11``. Use separators to ensure the input is parsed as intended. .. note:: When used to parse partial dates lacking a year, :meth:`.datetime.strptime` and :meth:`.date.strptime` will raise when encountering February...
trusted_official_docs
CPython Docs
example, with ``%Y%m%d``, the string ``2026111`` may be parsed either as ``2026-11-01`` or as ``2026-01-11``. Use separators to ensure the input is parsed as intended. .. note:: When used to parse partial dates lacking a year, :meth:`.datetime.strptime` and :meth:`.date.strptime` will raise when encountering February...
example, with ``%Y%m%d``, the string ``2026111`` may be parsed either as ``2026-11-01`` or as ``2026-01-11``. Use separators to ensure the input is parsed as intended. .. note:: When used to parse partial dates lacking a year, :meth:`.datetime.strptime` and :meth:`.date.strptime` will raise when encountering February...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a5aa875f-ee48-47a2-a179-25038c797d89
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,497
supabase-export-v2
5edccfe243c97cfb
.. warning:: Because naive ``datetime`` objects are treated by many ``datetime`` methods as local times, it is preferred to use aware datetimes to represent times in UTC. As such, the recommended way to create an object representing a specific timestamp in UTC is by calling ``datetime.fromtimestamp(timestamp, tz=ti...
trusted_official_docs
CPython Docs
.. warning:: Because naive ``datetime`` objects are treated by many ``datetime`` methods as local times, it is preferred to use aware datetimes to represent times in UTC. As such, the recommended way to create an object representing a specific timestamp in UTC is by calling ``datetime.fromtimestamp(timestamp, tz=ti...
.. warning:: Because naive ``datetime`` objects are treated by many ``datetime`` methods as local times, it is preferred to use aware datetimes to represent times in UTC. As such, the recommended way to create an object representing a specific timestamp in UTC is by calling ``datetime.fromtimestamp(timestamp, tz=ti...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a5ce9e24-2dde-4f48-b863-a0c282e8b61a
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,309
supabase-export-v2
c670c38cf7428367
Supported operations: +--------------------------------+-----------------------------------------------+ | Operation | Result | +================================+===============================================+ | ``t1 = t2 + t3`` | Sum of ``t2`` and ``t3``. | | | Afterwards ``t1 - t2 == t3`` and | | | ``t1 - t3 == t2``...
trusted_official_docs
CPython Docs
Supported operations: +--------------------------------+-----------------------------------------------+ | Operation | Result | +================================+===============================================+ | ``t1 = t2 + t3`` | Sum of ``t2`` and ``t3``. | | | Afterwards ``t1 - t2 == t3`` and | | | ``t1 - t3 == t2``...
Supported operations: +--------------------------------+-----------------------------------------------+ | Operation | Result | +================================+===============================================+ | ``t1 = t2 + t3`` | Sum of ``t2`` and ``t3``. | | | Afterwards ``t1 - t2 == t3`` and | | | ``t1 - t3 == t2``...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a7ac6782-2353-4301-b40f-5f0e68eb8cdd
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,848
supabase-export-v2
70d4d957b1574c67
| +-----------+--------------------------------+------------------------+-------+ | ``%u`` | ISO 8601 weekday as a decimal | 1, 2, ..., 7 | | | | number where 1 is Monday. | | | +-----------+--------------------------------+------------------------+-------+ | ``%U`` | Week number of the year | 00, 01, ..., 53 | \(7), |...
trusted_official_docs
CPython Docs
| +-----------+--------------------------------+------------------------+-------+ | ``%u`` | ISO 8601 weekday as a decimal | 1, 2, ..., 7 | | | | number where 1 is Monday. | | | +-----------+--------------------------------+------------------------+-------+ | ``%U`` | Week number of the year | 00, 01, ..., 53 | \(7), |...
| +-----------+--------------------------------+------------------------+-------+ | ``%u`` | ISO 8601 weekday as a decimal | 1, 2, ..., 7 | | | | number where 1 is Monday. | | | +-----------+--------------------------------+------------------------+-------+ | ``%U`` | Week number of the year | 00, 01, ..., 53 | \(7), |...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ab2b6097-dd39-4d98-99cc-8d6c579a565f
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,838
supabase-export-v2
e9568147b30cc9c7
The following is a list of all the format codes that the 2011 C standard requires, and these work on all supported platforms. +-----------+--------------------------------+------------------------+-------+ | Directive | Meaning | Example | Notes | | | | | | +===========+================================+================...
trusted_official_docs
CPython Docs
The following is a list of all the format codes that the 2011 C standard requires, and these work on all supported platforms. +-----------+--------------------------------+------------------------+-------+ | Directive | Meaning | Example | Notes | | | | | | +===========+================================+================...
The following is a list of all the format codes that the 2011 C standard requires, and these work on all supported platforms. +-----------+--------------------------------+------------------------+-------+ | Directive | Meaning | Example | Notes | | | | | | +===========+================================+================...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ab490993-eeac-4707-8b3e-fc33fb4ae78c
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,808
supabase-export-v2
4c8b8dc26e882e31
.. class:: timezone(offset[, name]) The *offset* argument must be specified as a :class:`timedelta` object representing the difference between the local time and UTC. It must be strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)``, otherwise :exc:`ValueError` is raised.
trusted_official_docs
CPython Docs
.. class:: timezone(offset[, name]) The *offset* argument must be specified as a :class:`timedelta` object representing the difference between the local time and UTC. It must be strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)``, otherwise :exc:`ValueError` is raised.
.. class:: timezone(offset[, name]) The *offset* argument must be specified as a :class:`timedelta` object representing the difference between the local time and UTC. It must be strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)``, otherwise :exc:`ValueError` is raised.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ae20908a-c5f6-49a0-acba-98acd0de134a
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,907
supabase-export-v2
194a75358e178e0e
.. [#] If, that is, we ignore the effects of relativity. .. [#] This matches the definition of the "proleptic Gregorian" calendar in Dershowitz and Reingold's book *Calendrical Calculations*, where it's the base calendar for all computations. See the book for algorithms for converting between proleptic Gregorian ord...
trusted_official_docs
CPython Docs
.. [#] If, that is, we ignore the effects of relativity. .. [#] This matches the definition of the "proleptic Gregorian" calendar in Dershowitz and Reingold's book *Calendrical Calculations*, where it's the base calendar for all computations. See the book for algorithms for converting between proleptic Gregorian ord...
.. [#] If, that is, we ignore the effects of relativity. .. [#] This matches the definition of the "proleptic Gregorian" calendar in Dershowitz and Reingold's book *Calendrical Calculations*, where it's the base calendar for all computations. See the book for algorithms for converting between proleptic Gregorian ord...
python, official-docs, cpython, P0
Local_Trusted_Corpus
aea3ee03-d7af-4bd8-9f58-ed80c2d15e43
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,589
supabase-export-v2
539ef3ad4c932630
returns ``None``, else returns ``self.tzinfo.dst(self)``, and raises an exception if the latter doesn't return ``None`` or a :class:`timedelta` object with magnitude less than one day. .. versionchanged:: 3.7 The DST offset is not restricted to a whole number of minutes.
trusted_official_docs
CPython Docs
returns ``None``, else returns ``self.tzinfo.dst(self)``, and raises an exception if the latter doesn't return ``None`` or a :class:`timedelta` object with magnitude less than one day. .. versionchanged:: 3.7 The DST offset is not restricted to a whole number of minutes.
returns ``None``, else returns ``self.tzinfo.dst(self)``, and raises an exception if the latter doesn't return ``None`` or a :class:`timedelta` object with magnitude less than one day. .. versionchanged:: 3.7 The DST offset is not restricted to a whole number of minutes.
python, official-docs, cpython, P0
Local_Trusted_Corpus
af34ef1c-c6ed-4eac-a831-2058bd26b465
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,837
supabase-export-v2
38a0b4ed4d4b45fa
dt >>> dt.datetime.strptime('31/01/22 23:59:59.999999', ... '%d/%m/%y %H:%M:%S.%f') datetime.datetime(2022, 1, 31, 23, 59, 59, 999999) >>> _.strftime('%a %d %b %Y, %I:%M%p') 'Mon 31 Jan 2022, 11:59PM' The following is a list of all the format codes that the 2011 C standard requires, and these work on all supported plat...
trusted_official_docs
CPython Docs
dt >>> dt.datetime.strptime('31/01/22 23:59:59.999999', ... '%d/%m/%y %H:%M:%S.%f') datetime.datetime(2022, 1, 31, 23, 59, 59, 999999) >>> _.strftime('%a %d %b %Y, %I:%M%p') 'Mon 31 Jan 2022, 11:59PM' The following is a list of all the format codes that the 2011 C standard requires, and these work on all supported plat...
dt >>> dt.datetime.strptime('31/01/22 23:59:59.999999', ... '%d/%m/%y %H:%M:%S.%f') datetime.datetime(2022, 1, 31, 23, 59, 59, 999999) >>> _.strftime('%a %d %b %Y, %I:%M%p') 'Mon 31 Jan 2022, 11:59PM' The following is a list of all the format codes that the 2011 C standard requires, and these work on all supported plat...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b111b850-1bf4-4536-9191-959c065b8e37
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,281
supabase-export-v2
2dcd7d94b04d2df3
* ``0 <= microseconds < 1000000`` * ``0 <= seconds < 3600*24`` (the number of seconds in one day) * ``-999999999 <= days <= 999999999`` The following example illustrates how any arguments besides *days*, *seconds* and *microseconds* are "merged" and normalized into those three resulting attributes::
trusted_official_docs
CPython Docs
* ``0 <= microseconds < 1000000`` * ``0 <= seconds < 3600*24`` (the number of seconds in one day) * ``-999999999 <= days <= 999999999`` The following example illustrates how any arguments besides *days*, *seconds* and *microseconds* are "merged" and normalized into those three resulting attributes::
* ``0 <= microseconds < 1000000`` * ``0 <= seconds < 3600*24`` (the number of seconds in one day) * ``-999999999 <= days <= 999999999`` The following example illustrates how any arguments besides *days*, *seconds* and *microseconds* are "merged" and normalized into those three resulting attributes::
python, official-docs, cpython, P0
Local_Trusted_Corpus
b1e8f9b3-7ff9-4acf-9d59-a41cd2b94759
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,631
supabase-export-v2
a1a437b549db4c6d
The optional argument *sep* (default ``'T'``) is a one-character separator, placed between the date and time portions of the result. For example:: >>> import datetime as dt >>> class TZ(dt.tzinfo): ... """A time zone with an arbitrary, constant -06:39 offset.""" ... def utcoffset(self, when): ... return dt.timedelt...
trusted_official_docs
CPython Docs
The optional argument *sep* (default ``'T'``) is a one-character separator, placed between the date and time portions of the result. For example:: >>> import datetime as dt >>> class TZ(dt.tzinfo): ... """A time zone with an arbitrary, constant -06:39 offset.""" ... def utcoffset(self, when): ... return dt.timedelt...
The optional argument *sep* (default ``'T'``) is a one-character separator, placed between the date and time portions of the result. For example:: >>> import datetime as dt >>> class TZ(dt.tzinfo): ... """A time zone with an arbitrary, constant -06:39 offset.""" ... def utcoffset(self, when): ... return dt.timedelt...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b2435d0a-b2b8-41e1-b3e6-c0ba682352c5
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,882
supabase-export-v2
bf19c8999fabf861
.. versionchanged:: 3.3 In version 3.2, :meth:`~.datetime.strftime` method was restricted to years >= 1000. (3) When used with the :meth:`~.datetime.strptime` method, the ``%p`` directive only affects the output hour field if the ``%I`` directive is used to parse the hour.
trusted_official_docs
CPython Docs
.. versionchanged:: 3.3 In version 3.2, :meth:`~.datetime.strftime` method was restricted to years >= 1000. (3) When used with the :meth:`~.datetime.strptime` method, the ``%p`` directive only affects the output hour field if the ``%I`` directive is used to parse the hour.
.. versionchanged:: 3.3 In version 3.2, :meth:`~.datetime.strftime` method was restricted to years >= 1000. (3) When used with the :meth:`~.datetime.strptime` method, the ``%p`` directive only affects the output hour field if the ``%I`` directive is used to parse the hour.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b2b46a33-5637-41f8-b9e7-b8bcff84cd79
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,578
supabase-export-v2
adfc2e1a06b4e498
``.tzinfo`` attribute of the converted datetime instance will be set to an instance of :class:`timezone` with the zone name and offset obtained from the OS. If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no adjustment of date or time data is performed. Else the result is local time in the tim...
trusted_official_docs
CPython Docs
``.tzinfo`` attribute of the converted datetime instance will be set to an instance of :class:`timezone` with the zone name and offset obtained from the OS. If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no adjustment of date or time data is performed. Else the result is local time in the tim...
``.tzinfo`` attribute of the converted datetime instance will be set to an instance of :class:`timezone` with the zone name and offset obtained from the OS. If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no adjustment of date or time data is performed. Else the result is local time in the tim...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b381d839-0c5e-45c5-84e1-3cd3cd2cd6f8
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,510
supabase-export-v2
d4f61ea492bf284b
Return a :class:`.datetime` corresponding to a *date_string* in any valid ISO 8601 format, with the following exceptions: 1. Time zone offsets may have fractional seconds. 2. The ``T`` separator may be replaced by any single unicode character. 3. Fractional hours and minutes are not supported. 4. Reduced precision date...
trusted_official_docs
CPython Docs
Return a :class:`.datetime` corresponding to a *date_string* in any valid ISO 8601 format, with the following exceptions: 1. Time zone offsets may have fractional seconds. 2. The ``T`` separator may be replaced by any single unicode character. 3. Fractional hours and minutes are not supported. 4. Reduced precision date...
Return a :class:`.datetime` corresponding to a *date_string* in any valid ISO 8601 format, with the following exceptions: 1. Time zone offsets may have fractional seconds. 2. The ``T`` separator may be replaced by any single unicode character. 3. Fractional hours and minutes are not supported. 4. Reduced precision date...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b526aed7-f651-4459-919f-4c864d341bc2
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,582
supabase-export-v2
ae25fd7f8619cb1e
Convert self to UTC, and attach the new timezone object. utc = (self - self.utcoffset()).replace(tzinfo=tz) # Convert from UTC to tz's local time. return tz.fromutc(utc) .. versionchanged:: 3.3 *tz* now can be omitted.
trusted_official_docs
CPython Docs
Convert self to UTC, and attach the new timezone object. utc = (self - self.utcoffset()).replace(tzinfo=tz) # Convert from UTC to tz's local time. return tz.fromutc(utc) .. versionchanged:: 3.3 *tz* now can be omitted.
Convert self to UTC, and attach the new timezone object. utc = (self - self.utcoffset()).replace(tzinfo=tz) # Convert from UTC to tz's local time. return tz.fromutc(utc) .. versionchanged:: 3.3 *tz* now can be omitted.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b5af7a37-2037-46e7-b5e6-7824fccb23fb
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,880
supabase-export-v2
4f9e5b5e91e8472c
(2) The :meth:`~.datetime.strptime` method can parse years in the full [1, 9999] range, but years < 1000 must be zero-filled to 4-digit width. .. versionchanged:: 3.2 In previous versions, :meth:`~.datetime.strftime` method was restricted to years >= 1900.
trusted_official_docs
CPython Docs
(2) The :meth:`~.datetime.strptime` method can parse years in the full [1, 9999] range, but years < 1000 must be zero-filled to 4-digit width. .. versionchanged:: 3.2 In previous versions, :meth:`~.datetime.strftime` method was restricted to years >= 1900.
(2) The :meth:`~.datetime.strptime` method can parse years in the full [1, 9999] range, but years < 1000 must be zero-filled to 4-digit width. .. versionchanged:: 3.2 In previous versions, :meth:`~.datetime.strftime` method was restricted to years >= 1900.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b7a04ecc-8455-4f72-9661-20993dc03ed1
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,875
supabase-export-v2
feaa019d5f54cb93
hours, minutes, seconds, and microseconds should not be used, as :class:`date` objects have no such values. If they're used anyway, 0 is substituted for them. For the same reason, handling of format strings containing Unicode code points that can't be represented in the charset of the current locale is also platform-de...
trusted_official_docs
CPython Docs
hours, minutes, seconds, and microseconds should not be used, as :class:`date` objects have no such values. If they're used anyway, 0 is substituted for them. For the same reason, handling of format strings containing Unicode code points that can't be represented in the charset of the current locale is also platform-de...
hours, minutes, seconds, and microseconds should not be used, as :class:`date` objects have no such values. If they're used anyway, 0 is substituted for them. For the same reason, handling of format strings containing Unicode code points that can't be represented in the charset of the current locale is also platform-de...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b8159b71-d602-45c8-9790-d065548436bf
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,453
supabase-export-v2
1a2411fca75dfe27
A :class:`.datetime` object is a single object containing all the information from a :class:`date` object and a :class:`.time` object. Like a :class:`date` object, :class:`.datetime` assumes the current Gregorian calendar extended in both directions; like a :class:`.time` object, :class:`!datetime` assumes there are ex...
trusted_official_docs
CPython Docs
A :class:`.datetime` object is a single object containing all the information from a :class:`date` object and a :class:`.time` object. Like a :class:`date` object, :class:`.datetime` assumes the current Gregorian calendar extended in both directions; like a :class:`.time` object, :class:`!datetime` assumes there are ex...
A :class:`.datetime` object is a single object containing all the information from a :class:`date` object and a :class:`.time` object. Like a :class:`date` object, :class:`.datetime` assumes the current Gregorian calendar extended in both directions; like a :class:`.time` object, :class:`!datetime` assumes there are ex...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b8a53826-eec0-4eda-a244-d95d8146fa1b
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,887
supabase-export-v2
96d56d627c18ad1c
For an aware object: ``%z`` :meth:`~.datetime.utcoffset` is transformed into a string of the form ``±HHMM[SS[.ffffff]]``, where ``HH`` is a 2-digit string giving the number of UTC offset hours, ``MM`` is a 2-digit string giving the number of UTC offset minutes, ``SS`` is a 2-digit string giving the number of UTC of...
trusted_official_docs
CPython Docs
For an aware object: ``%z`` :meth:`~.datetime.utcoffset` is transformed into a string of the form ``±HHMM[SS[.ffffff]]``, where ``HH`` is a 2-digit string giving the number of UTC offset hours, ``MM`` is a 2-digit string giving the number of UTC offset minutes, ``SS`` is a 2-digit string giving the number of UTC of...
For an aware object: ``%z`` :meth:`~.datetime.utcoffset` is transformed into a string of the form ``±HHMM[SS[.ffffff]]``, where ``HH`` is a 2-digit string giving the number of UTC offset hours, ``MM`` is a 2-digit string giving the number of UTC offset minutes, ``SS`` is a 2-digit string giving the number of UTC of...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b9483347-0958-4d33-9998-8d790ea136fc
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,336
supabase-export-v2
26f21f0ee363bce6
Examples of :class:`timedelta` arithmetic:: >>> import datetime as dt >>> year = dt.timedelta(days=365) >>> ten_years = 10 * year >>> ten_years datetime.timedelta(days=3650) >>> ten_years.days // 365 10 >>> nine_years = ten_years - year >>> nine_years datetime.timedelta(days=3285) >>> three_years = nine_years...
trusted_official_docs
CPython Docs
Examples of :class:`timedelta` arithmetic:: >>> import datetime as dt >>> year = dt.timedelta(days=365) >>> ten_years = 10 * year >>> ten_years datetime.timedelta(days=3650) >>> ten_years.days // 365 10 >>> nine_years = ten_years - year >>> nine_years datetime.timedelta(days=3285) >>> three_years = nine_years...
Examples of :class:`timedelta` arithmetic:: >>> import datetime as dt >>> year = dt.timedelta(days=365) >>> ten_years = 10 * year >>> ten_years datetime.timedelta(days=3650) >>> ten_years.days // 365 10 >>> nine_years = ten_years - year >>> nine_years datetime.timedelta(days=3285) >>> three_years = nine_years...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b9947b86-3681-4a83-8e09-fc0bffd558b6
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,714
supabase-export-v2
51ce4a076f56a348
.. method:: time.replace(hour=self.hour, minute=self.minute, second=self.second, \ microsecond=self.microsecond, tzinfo=self.tzinfo, *, fold=0) Return a new :class:`.time` with the same values, but with specified parameters updated. Note that ``tzinfo=None`` can be specified to create a naive :class:`!time` from an a...
trusted_official_docs
CPython Docs
.. method:: time.replace(hour=self.hour, minute=self.minute, second=self.second, \ microsecond=self.microsecond, tzinfo=self.tzinfo, *, fold=0) Return a new :class:`.time` with the same values, but with specified parameters updated. Note that ``tzinfo=None`` can be specified to create a naive :class:`!time` from an a...
.. method:: time.replace(hour=self.hour, minute=self.minute, second=self.second, \ microsecond=self.microsecond, tzinfo=self.tzinfo, *, fold=0) Return a new :class:`.time` with the same values, but with specified parameters updated. Note that ``tzinfo=None`` can be specified to create a naive :class:`!time` from an a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ba312569-b7bc-4b79-8d13-4a05366a8311
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,486
supabase-export-v2
2b629f856a794d2c
out of the range of values supported by the platform C :c:func:`localtime` or :c:func:`gmtime` functions. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:`localtime` or :c:func:`gmtime` failure. .. versionchanged:: 3.6 :meth:`fromtimestamp` may return instances with :attr:`.fold` set to 1.
trusted_official_docs
CPython Docs
out of the range of values supported by the platform C :c:func:`localtime` or :c:func:`gmtime` functions. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:`localtime` or :c:func:`gmtime` failure. .. versionchanged:: 3.6 :meth:`fromtimestamp` may return instances with :attr:`.fold` set to 1.
out of the range of values supported by the platform C :c:func:`localtime` or :c:func:`gmtime` functions. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:`localtime` or :c:func:`gmtime` failure. .. versionchanged:: 3.6 :meth:`fromtimestamp` may return instances with :attr:`.fold` set to 1.
python, official-docs, cpython, P0
Local_Trusted_Corpus
bae4873b-4aab-4796-9dcc-16f67db0bb4a
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,279
supabase-export-v2
b6269d7a57cd66b4
microseconds. * A minute is converted to 60 seconds. * An hour is converted to 3600 seconds. * A week is converted to 7 days. and days, seconds and microseconds are then normalized so that the representation is unique, with
trusted_official_docs
CPython Docs
microseconds. * A minute is converted to 60 seconds. * An hour is converted to 3600 seconds. * A week is converted to 7 days. and days, seconds and microseconds are then normalized so that the representation is unique, with
microseconds. * A minute is converted to 60 seconds. * An hour is converted to 3600 seconds. * A week is converted to 7 days. and days, seconds and microseconds are then normalized so that the representation is unique, with
python, official-docs, cpython, P0
Local_Trusted_Corpus
bc0668ee-6d71-40af-95c1-0dae944691cc
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,229
supabase-export-v2
6d706be101817f07
Date and time objects may be categorized as "aware" or "naive" depending on whether or not they include time zone information. With sufficient knowledge of applicable algorithmic and political time adjustments, such as time zone and daylight saving time information, an **aware** object can locate itself relative to oth...
trusted_official_docs
CPython Docs
Date and time objects may be categorized as "aware" or "naive" depending on whether or not they include time zone information. With sufficient knowledge of applicable algorithmic and political time adjustments, such as time zone and daylight saving time information, an **aware** object can locate itself relative to oth...
Date and time objects may be categorized as "aware" or "naive" depending on whether or not they include time zone information. With sufficient knowledge of applicable algorithmic and political time adjustments, such as time zone and daylight saving time information, an **aware** object can locate itself relative to oth...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bdd92621-c14f-4b34-80e2-664ac52176db
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,665
supabase-export-v2
a5bbf220d1bd555d
the imaginary range, use fold to decide how # to resolve. See PEP 495. return dt.timedelta(hours=4, minutes=(30 if when.fold else 0)) else: return dt.timedelta(hours=4, minutes=30) def fromutc(self, when): # Follow same validations as in datetime.tzinfo if not isinstance(when, dt.datetime): raise TypeError("fromutc(...
trusted_official_docs
CPython Docs
the imaginary range, use fold to decide how # to resolve. See PEP 495. return dt.timedelta(hours=4, minutes=(30 if when.fold else 0)) else: return dt.timedelta(hours=4, minutes=30) def fromutc(self, when): # Follow same validations as in datetime.tzinfo if not isinstance(when, dt.datetime): raise TypeError("fromutc(...
the imaginary range, use fold to decide how # to resolve. See PEP 495. return dt.timedelta(hours=4, minutes=(30 if when.fold else 0)) else: return dt.timedelta(hours=4, minutes=30) def fromutc(self, when): # Follow same validations as in datetime.tzinfo if not isinstance(when, dt.datetime): raise TypeError("fromutc(...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bfd4650f-1d51-4553-a4cd-ce01fd5cdac8
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,787
supabase-export-v2
94b1ac189943701e
# convert to standard local time dtdst = when.dst() # raise ValueError if dtdst is None if dtdst: return when + dtdst else: return when In the following :download:`tzinfo_examples.py <../includes/tzinfo_examples.py>` file there are some examples of :class:`tzinfo` classes:
trusted_official_docs
CPython Docs
# convert to standard local time dtdst = when.dst() # raise ValueError if dtdst is None if dtdst: return when + dtdst else: return when In the following :download:`tzinfo_examples.py <../includes/tzinfo_examples.py>` file there are some examples of :class:`tzinfo` classes:
# convert to standard local time dtdst = when.dst() # raise ValueError if dtdst is None if dtdst: return when + dtdst else: return when In the following :download:`tzinfo_examples.py <../includes/tzinfo_examples.py>` file there are some examples of :class:`tzinfo` classes:
python, official-docs, cpython, P0
Local_Trusted_Corpus
c246651a-bb42-444e-8f88-ef29dda73b99
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,399
supabase-export-v2
5652b323bd9bfb3c
Order comparison between a :class:`date` object that is not also a :class:`.datetime` instance and a :class:`!datetime` object raises :exc:`TypeError`. .. versionchanged:: 3.13 Comparison between :class:`.datetime` object and an instance of the :class:`date` subclass that is not a :class:`!datetime` subclass no long...
trusted_official_docs
CPython Docs
Order comparison between a :class:`date` object that is not also a :class:`.datetime` instance and a :class:`!datetime` object raises :exc:`TypeError`. .. versionchanged:: 3.13 Comparison between :class:`.datetime` object and an instance of the :class:`date` subclass that is not a :class:`!datetime` subclass no long...
Order comparison between a :class:`date` object that is not also a :class:`.datetime` instance and a :class:`!datetime` object raises :exc:`TypeError`. .. versionchanged:: 3.13 Comparison between :class:`.datetime` object and an instance of the :class:`date` subclass that is not a :class:`!datetime` subclass no long...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c2a2b55a-111d-4390-b2e7-6938a9002498
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,484
supabase-export-v2
6f9085e9050123f4
If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` subclass, and the timestamp is converted to *tz*’s time zone. :meth:`fromtimestamp` may raise :exc:`OverflowError`, if the timestamp is out of the range of values supported by the platform C :c:func:`localtime` or :c:func:`gmtime` functions, and :ex...
trusted_official_docs
CPython Docs
If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` subclass, and the timestamp is converted to *tz*’s time zone. :meth:`fromtimestamp` may raise :exc:`OverflowError`, if the timestamp is out of the range of values supported by the platform C :c:func:`localtime` or :c:func:`gmtime` functions, and :ex...
If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` subclass, and the timestamp is converted to *tz*’s time zone. :meth:`fromtimestamp` may raise :exc:`OverflowError`, if the timestamp is out of the range of values supported by the platform C :c:func:`localtime` or :c:func:`gmtime` functions, and :ex...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c4143fa4-641f-4046-ad6a-dc81e9ac898e
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,790
supabase-export-v2
4921c68ec8d10511
begins the minute after 1:59 (EST) on the second Sunday in March, and ends the minute after 1:59 (EDT) on the first Sunday in November:: UTC 3:MM 4:MM 5:MM 6:MM 7:MM 8:MM EST 22:MM 23:MM 0:MM 1:MM 2:MM 3:MM EDT 23:MM 0:MM 1:MM 2:MM 3:MM 4:MM
trusted_official_docs
CPython Docs
begins the minute after 1:59 (EST) on the second Sunday in March, and ends the minute after 1:59 (EDT) on the first Sunday in November:: UTC 3:MM 4:MM 5:MM 6:MM 7:MM 8:MM EST 22:MM 23:MM 0:MM 1:MM 2:MM 3:MM EDT 23:MM 0:MM 1:MM 2:MM 3:MM 4:MM
begins the minute after 1:59 (EST) on the second Sunday in March, and ends the minute after 1:59 (EDT) on the first Sunday in November:: UTC 3:MM 4:MM 5:MM 6:MM 7:MM 8:MM EST 22:MM 23:MM 0:MM 1:MM 2:MM 3:MM EDT 23:MM 0:MM 1:MM 2:MM 3:MM 4:MM
python, official-docs, cpython, P0
Local_Trusted_Corpus
c4c693d0-790c-4975-80fd-b3916ba6170e
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,735
supabase-export-v2
c62376e9421a9931
.. method:: time.utcoffset() If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo.utcoffset(None)``, and raises an exception if the latter doesn't return ``None`` or a :class:`timedelta` object with magnitude less than one day.
trusted_official_docs
CPython Docs
.. method:: time.utcoffset() If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo.utcoffset(None)``, and raises an exception if the latter doesn't return ``None`` or a :class:`timedelta` object with magnitude less than one day.
.. method:: time.utcoffset() If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo.utcoffset(None)``, and raises an exception if the latter doesn't return ``None`` or a :class:`timedelta` object with magnitude less than one day.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c8db40c5-198d-4e0e-8bf6-7864538e656b
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,444
supabase-export-v2
d6649b7f0329070b
if my_birthday < today: ... my_birthday = my_birthday.replace(year=today.year + 1) ... >>> my_birthday datetime.date(2008, 6, 24) >>> time_to_birthday = abs(my_birthday - today) >>> time_to_birthday.days 202 More examples of working with :class:`date`:
trusted_official_docs
CPython Docs
if my_birthday < today: ... my_birthday = my_birthday.replace(year=today.year + 1) ... >>> my_birthday datetime.date(2008, 6, 24) >>> time_to_birthday = abs(my_birthday - today) >>> time_to_birthday.days 202 More examples of working with :class:`date`:
if my_birthday < today: ... my_birthday = my_birthday.replace(year=today.year + 1) ... >>> my_birthday datetime.date(2008, 6, 24) >>> time_to_birthday = abs(my_birthday - today) >>> time_to_birthday.days 202 More examples of working with :class:`date`:
python, official-docs, cpython, P0
Local_Trusted_Corpus
c90935b1-a6f4-498a-980a-169325e7bd54
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,549
supabase-export-v2
5fa87a4434113613
comparison. (5) | | | ``datetime1 > datetime2`` | | | | ``datetime1 <= datetime2`` | | | | ``datetime1 >= datetime2`` | | +---------------------------------------+--------------------------------+ (1) ``datetime2`` is a duration of ``timedelta`` removed from ``datetime1``, moving forward in time if ``timedelta.days >...
trusted_official_docs
CPython Docs
comparison. (5) | | | ``datetime1 > datetime2`` | | | | ``datetime1 <= datetime2`` | | | | ``datetime1 >= datetime2`` | | +---------------------------------------+--------------------------------+ (1) ``datetime2`` is a duration of ``timedelta`` removed from ``datetime1``, moving forward in time if ``timedelta.days >...
comparison. (5) | | | ``datetime1 > datetime2`` | | | | ``datetime1 <= datetime2`` | | | | ``datetime1 >= datetime2`` | | +---------------------------------------+--------------------------------+ (1) ``datetime2`` is a duration of ``timedelta`` removed from ``datetime1``, moving forward in time if ``timedelta.days >...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c985ae09-eea5-48bd-87dd-f7a1444b6787
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,447
supabase-export-v2
f224782b49762ef6
>>> import datetime as dt >>> d = dt.date.fromordinal(730920) # 730920th day after 1. 1. 0001 >>> d datetime.date(2002, 3, 11) >>> # Methods related to formatting string output >>> d.isoformat() '2002-03-11' >>> d.strftime("%d/%m/%y") '11/03/02' >>> d.strftime("%A %d. %B %Y") 'Monday 11. March 2002' >>> d.ctime(...
trusted_official_docs
CPython Docs
>>> import datetime as dt >>> d = dt.date.fromordinal(730920) # 730920th day after 1. 1. 0001 >>> d datetime.date(2002, 3, 11) >>> # Methods related to formatting string output >>> d.isoformat() '2002-03-11' >>> d.strftime("%d/%m/%y") '11/03/02' >>> d.strftime("%A %d. %B %Y") 'Monday 11. March 2002' >>> d.ctime(...
>>> import datetime as dt >>> d = dt.date.fromordinal(730920) # 730920th day after 1. 1. 0001 >>> d datetime.date(2002, 3, 11) >>> # Methods related to formatting string output >>> d.isoformat() '2002-03-11' >>> d.strftime("%d/%m/%y") '11/03/02' >>> d.strftime("%A %d. %B %Y") 'Monday 11. March 2002' >>> d.ctime(...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cb6ee3db-c4ec-4a24-b3c5-eecd7676e25c
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,706
supabase-export-v2
00a602f004178cb6
384) >>> dt.time.fromisoformat('04:23:01,000384') datetime.time(4, 23, 1, 384) >>> dt.time.fromisoformat('04:23:01+04:00') datetime.time(4, 23, 1, tzinfo=datetime.timezone(datetime.timedelta(seconds=14400))) >>> dt.time.fromisoformat('04:23:01Z') datetime.time(4, 23, 1, tzinfo=datetime.timezone.utc) >>> dt.time.fromiso...
trusted_official_docs
CPython Docs
384) >>> dt.time.fromisoformat('04:23:01,000384') datetime.time(4, 23, 1, 384) >>> dt.time.fromisoformat('04:23:01+04:00') datetime.time(4, 23, 1, tzinfo=datetime.timezone(datetime.timedelta(seconds=14400))) >>> dt.time.fromisoformat('04:23:01Z') datetime.time(4, 23, 1, tzinfo=datetime.timezone.utc) >>> dt.time.fromiso...
384) >>> dt.time.fromisoformat('04:23:01,000384') datetime.time(4, 23, 1, 384) >>> dt.time.fromisoformat('04:23:01+04:00') datetime.time(4, 23, 1, tzinfo=datetime.timezone(datetime.timedelta(seconds=14400))) >>> dt.time.fromisoformat('04:23:01Z') datetime.time(4, 23, 1, tzinfo=datetime.timezone.utc) >>> dt.time.fromiso...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cbaed552-92a2-4789-963e-d477c46cc729
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,786
supabase-export-v2
59d416de04b8e57b
import datetime as dt def fromutc(self, when): # raise ValueError error if when.tzinfo is not self dtoff = when.utcoffset() dtdst = when.dst() # raise ValueError if dtoff is None or dtdst is None delta = dtoff - dtdst # this is self's standard offset if delta: when += delta # convert to standard local time dtds...
trusted_official_docs
CPython Docs
import datetime as dt def fromutc(self, when): # raise ValueError error if when.tzinfo is not self dtoff = when.utcoffset() dtdst = when.dst() # raise ValueError if dtoff is None or dtdst is None delta = dtoff - dtdst # this is self's standard offset if delta: when += delta # convert to standard local time dtds...
import datetime as dt def fromutc(self, when): # raise ValueError error if when.tzinfo is not self dtoff = when.utcoffset() dtdst = when.dst() # raise ValueError if dtoff is None or dtdst is None delta = dtoff - dtdst # this is self's standard offset if delta: when += delta # convert to standard local time dtds...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cc2fa0ea-bcde-4ccb-9f3b-ac194d57c803
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,845
supabase-export-v2
652e2b70336c9c6b
| | +-----------+--------------------------------+------------------------+-------+ | ``%j`` | Day of the year as a | 001, 002, ..., 366 | \(9) | | | zero-padded decimal number. | | | +-----------+--------------------------------+------------------------+-------+ | ``%m`` | Month as a zero-padded | 01, 02, ..., 12 | \(...
trusted_official_docs
CPython Docs
| | +-----------+--------------------------------+------------------------+-------+ | ``%j`` | Day of the year as a | 001, 002, ..., 366 | \(9) | | | zero-padded decimal number. | | | +-----------+--------------------------------+------------------------+-------+ | ``%m`` | Month as a zero-padded | 01, 02, ..., 12 | \(...
| | +-----------+--------------------------------+------------------------+-------+ | ``%j`` | Day of the year as a | 001, 002, ..., 366 | \(9) | | | zero-padded decimal number. | | | +-----------+--------------------------------+------------------------+-------+ | ``%m`` | Month as a zero-padded | 01, 02, ..., 12 | \(...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cd56f80d-ba95-4a88-a019-c9922e0cb1d6
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,330
supabase-export-v2
7dca9dd4c27f2f59
contained in the duration. Equivalent to ``td / timedelta(seconds=1)``. For interval units other than seconds, use the division form directly (for example, ``td / timedelta(microseconds=1)``). Note that for very large time intervals (greater than 270 years on most platforms) this method will lose microsecond accuracy.
trusted_official_docs
CPython Docs
contained in the duration. Equivalent to ``td / timedelta(seconds=1)``. For interval units other than seconds, use the division form directly (for example, ``td / timedelta(microseconds=1)``). Note that for very large time intervals (greater than 270 years on most platforms) this method will lose microsecond accuracy.
contained in the duration. Equivalent to ``td / timedelta(seconds=1)``. For interval units other than seconds, use the division form directly (for example, ``td / timedelta(microseconds=1)``). Note that for very large time intervals (greater than 270 years on most platforms) this method will lose microsecond accuracy.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cd88fe35-fb2d-4fd2-a5d3-b6b69eb92a4e
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,569
supabase-export-v2
d47f6d1630c0d269
Return :class:`.time` object with same hour, minute, second, microsecond, fold, and tzinfo attributes. See also method :meth:`time`. .. versionchanged:: 3.6 The fold value is copied to the returned :class:`.time` object.
trusted_official_docs
CPython Docs
Return :class:`.time` object with same hour, minute, second, microsecond, fold, and tzinfo attributes. See also method :meth:`time`. .. versionchanged:: 3.6 The fold value is copied to the returned :class:`.time` object.
Return :class:`.time` object with same hour, minute, second, microsecond, fold, and tzinfo attributes. See also method :meth:`time`. .. versionchanged:: 3.6 The fold value is copied to the returned :class:`.time` object.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cda4e115-819b-434c-a8cd-d8854a20791c
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,806
supabase-export-v2
58f63170e7a17888
The :class:`timezone` class is a subclass of :class:`tzinfo`, each instance of which represents a time zone defined by a fixed offset from UTC. Objects of this class cannot be used to represent time zone information in the locations where different offsets are used in different days of the year or where historical chan...
trusted_official_docs
CPython Docs
The :class:`timezone` class is a subclass of :class:`tzinfo`, each instance of which represents a time zone defined by a fixed offset from UTC. Objects of this class cannot be used to represent time zone information in the locations where different offsets are used in different days of the year or where historical chan...
The :class:`timezone` class is a subclass of :class:`tzinfo`, each instance of which represents a time zone defined by a fixed offset from UTC. Objects of this class cannot be used to represent time zone information in the locations where different offsets are used in different days of the year or where historical chan...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cf3dbfca-36de-42e0-954e-a11782edd755
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,418
supabase-export-v2
953f51bbbe060c2d
.. method:: date.isoweekday() Return the day of the week as an integer, where Monday is 1 and Sunday is 7. For example, ``date(2002, 12, 4).isoweekday() == 3``, a Wednesday. See also :meth:`weekday`, :meth:`isocalendar`.
trusted_official_docs
CPython Docs
.. method:: date.isoweekday() Return the day of the week as an integer, where Monday is 1 and Sunday is 7. For example, ``date(2002, 12, 4).isoweekday() == 3``, a Wednesday. See also :meth:`weekday`, :meth:`isocalendar`.
.. method:: date.isoweekday() Return the day of the week as an integer, where Monday is 1 and Sunday is 7. For example, ``date(2002, 12, 4).isoweekday() == 3``, a Wednesday. See also :meth:`weekday`, :meth:`isocalendar`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cfe85ddd-ed02-40bc-83de-8277ce6f56de
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,890
supabase-export-v2
5b945550dd8dd62b
and seconds. For example, both ``'+010000'`` and ``'+01:00:00'`` will be parsed as an offset of one hour. In addition, providing ``'Z'`` is identical to ``'+00:00'``. ``%:z`` When used with :meth:`~.datetime.strftime`, behaves exactly as ``%z``, except that a colon separator is added between hours, minutes and second...
trusted_official_docs
CPython Docs
and seconds. For example, both ``'+010000'`` and ``'+01:00:00'`` will be parsed as an offset of one hour. In addition, providing ``'Z'`` is identical to ``'+00:00'``. ``%:z`` When used with :meth:`~.datetime.strftime`, behaves exactly as ``%z``, except that a colon separator is added between hours, minutes and second...
and seconds. For example, both ``'+010000'`` and ``'+01:00:00'`` will be parsed as an offset of one hour. In addition, providing ``'Z'`` is identical to ``'+00:00'``. ``%:z`` When used with :meth:`~.datetime.strftime`, behaves exactly as ``%z``, except that a colon separator is added between hours, minutes and second...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d1d1502e-2993-49c0-877c-7deb4ab0619d
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,809
supabase-export-v2
023c5970448836ba
as a :class:`timedelta` object representing the difference between the local time and UTC. It must be strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)``, otherwise :exc:`ValueError` is raised. The *name* argument is optional. If specified it must be a string that will be used as the value returned b...
trusted_official_docs
CPython Docs
as a :class:`timedelta` object representing the difference between the local time and UTC. It must be strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)``, otherwise :exc:`ValueError` is raised. The *name* argument is optional. If specified it must be a string that will be used as the value returned b...
as a :class:`timedelta` object representing the difference between the local time and UTC. It must be strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)``, otherwise :exc:`ValueError` is raised. The *name* argument is optional. If specified it must be a string that will be used as the value returned b...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d1ef7bb6-07ae-4159-b39a-6fb8bf9e7392
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,736
supabase-export-v2
62f713390b22715e
returns ``None``, else returns ``self.tzinfo.utcoffset(None)``, and raises an exception if the latter doesn't return ``None`` or a :class:`timedelta` object with magnitude less than one day. .. versionchanged:: 3.7 The UTC offset is not restricted to a whole number of minutes.
trusted_official_docs
CPython Docs
returns ``None``, else returns ``self.tzinfo.utcoffset(None)``, and raises an exception if the latter doesn't return ``None`` or a :class:`timedelta` object with magnitude less than one day. .. versionchanged:: 3.7 The UTC offset is not restricted to a whole number of minutes.
returns ``None``, else returns ``self.tzinfo.utcoffset(None)``, and raises an exception if the latter doesn't return ``None`` or a :class:`timedelta` object with magnitude less than one day. .. versionchanged:: 3.7 The UTC offset is not restricted to a whole number of minutes.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d210c2c6-43fa-4f1f-88dc-7b5c070e0386
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,351
supabase-export-v2
c8c523a9af48c1b0
Return the local date corresponding to the POSIX *timestamp*, such as is returned by :func:`time.time`. This may raise :exc:`OverflowError`, if the timestamp is out of the range of values supported by the platform C :c:func:`localtime` function, and :exc:`OSError` on :c:func:`localtime` failure. It's common for this ...
trusted_official_docs
CPython Docs
Return the local date corresponding to the POSIX *timestamp*, such as is returned by :func:`time.time`. This may raise :exc:`OverflowError`, if the timestamp is out of the range of values supported by the platform C :c:func:`localtime` function, and :exc:`OSError` on :c:func:`localtime` failure. It's common for this ...
Return the local date corresponding to the POSIX *timestamp*, such as is returned by :func:`time.time`. This may raise :exc:`OverflowError`, if the timestamp is out of the range of values supported by the platform C :c:func:`localtime` function, and :exc:`OSError` on :c:func:`localtime` failure. It's common for this ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d2226d44-7265-41b6-b139-04d07643e3e4
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,580
supabase-export-v2
3f172b4f3593648f
use ``dt.replace(tzinfo=tz)``. If you merely want to remove the :class:`!timezone` object from an aware datetime *dt* without conversion of date and time data, use ``dt.replace(tzinfo=None)``. Note that the default :meth:`tzinfo.fromutc` method can be overridden in a :class:`tzinfo` subclass to affect the result retur...
trusted_official_docs
CPython Docs
use ``dt.replace(tzinfo=tz)``. If you merely want to remove the :class:`!timezone` object from an aware datetime *dt* without conversion of date and time data, use ``dt.replace(tzinfo=None)``. Note that the default :meth:`tzinfo.fromutc` method can be overridden in a :class:`tzinfo` subclass to affect the result retur...
use ``dt.replace(tzinfo=tz)``. If you merely want to remove the :class:`!timezone` object from an aware datetime *dt* without conversion of date and time data, use ``dt.replace(tzinfo=None)``. Note that the default :meth:`tzinfo.fromutc` method can be overridden in a :class:`tzinfo` subclass to affect the result retur...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d34afb94-387f-40ac-bf9b-0c339ac1308c
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,784
supabase-export-v2
41a12582f71fbaad
:meth:`~.datetime.astimezone` and :meth:`fromutc` may not produce the result you want if the result is one of the hours straddling the moment the standard offset changes. Skipping code for error cases, the default :meth:`fromutc` implementation acts like::
trusted_official_docs
CPython Docs
:meth:`~.datetime.astimezone` and :meth:`fromutc` may not produce the result you want if the result is one of the hours straddling the moment the standard offset changes. Skipping code for error cases, the default :meth:`fromutc` implementation acts like::
:meth:`~.datetime.astimezone` and :meth:`fromutc` may not produce the result you want if the result is one of the hours straddling the moment the standard offset changes. Skipping code for error cases, the default :meth:`fromutc` implementation acts like::
python, official-docs, cpython, P0
Local_Trusted_Corpus
d41f9104-999c-4935-b9c1-195052b979d3
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,738
supabase-export-v2
e134800daf8be0dc
.. method:: time.dst() If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo.dst(None)``, and raises an exception if the latter doesn't return ``None``, or a :class:`timedelta` object with magnitude less than one day.
trusted_official_docs
CPython Docs
.. method:: time.dst() If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo.dst(None)``, and raises an exception if the latter doesn't return ``None``, or a :class:`timedelta` object with magnitude less than one day.
.. method:: time.dst() If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo.dst(None)``, and raises an exception if the latter doesn't return ``None``, or a :class:`timedelta` object with magnitude less than one day.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d56362db-d6f8-48fe-8ff8-56af1308377a
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,449
supabase-export-v2
33bca5207af59590
ic: # doctest: +SKIP ... print(i) 2002 # ISO year 11 # ISO week number 1 # ISO day number ( 1 = Monday ) >>> # A date object is immutable; all operations produce a new object >>> d.replace(year=2005) datetime.date(2005, 3, 11)
trusted_official_docs
CPython Docs
ic: # doctest: +SKIP ... print(i) 2002 # ISO year 11 # ISO week number 1 # ISO day number ( 1 = Monday ) >>> # A date object is immutable; all operations produce a new object >>> d.replace(year=2005) datetime.date(2005, 3, 11)
ic: # doctest: +SKIP ... print(i) 2002 # ISO year 11 # ISO week number 1 # ISO day number ( 1 = Monday ) >>> # A date object is immutable; all operations produce a new object >>> d.replace(year=2005) datetime.date(2005, 3, 11)
python, official-docs, cpython, P0
Local_Trusted_Corpus
d5da4691-da07-4d25-94da-7ab334a923e7
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,548
supabase-export-v2
ff282eca7f05719d
datetime1 - timedelta`` | \(2) | +---------------------------------------+--------------------------------+ | ``timedelta = datetime1 - datetime2`` | \(3) | +---------------------------------------+--------------------------------+ | | ``datetime1 == datetime2`` | Equality comparison. (4) | | | ``datetime1 != datetime2...
trusted_official_docs
CPython Docs
datetime1 - timedelta`` | \(2) | +---------------------------------------+--------------------------------+ | ``timedelta = datetime1 - datetime2`` | \(3) | +---------------------------------------+--------------------------------+ | | ``datetime1 == datetime2`` | Equality comparison. (4) | | | ``datetime1 != datetime2...
datetime1 - timedelta`` | \(2) | +---------------------------------------+--------------------------------+ | ``timedelta = datetime1 - datetime2`` | \(3) | +---------------------------------------+--------------------------------+ | | ``datetime1 == datetime2`` | Equality comparison. (4) | | | ``datetime1 != datetime2...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d9c8de28-1bb1-4ce4-8fad-703a0e81158b
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,521
supabase-export-v2
3b57ecc7df4a7b69
datetime(*(time.strptime(date_string, format)[0:6])) :exc:`ValueError` is raised if the date_string and format can't be parsed by :func:`time.strptime` or if it returns a value which isn't a time tuple. See also :ref:`strftime-strptime-behavior` and :meth:`datetime.fromisoformat`.
trusted_official_docs
CPython Docs
datetime(*(time.strptime(date_string, format)[0:6])) :exc:`ValueError` is raised if the date_string and format can't be parsed by :func:`time.strptime` or if it returns a value which isn't a time tuple. See also :ref:`strftime-strptime-behavior` and :meth:`datetime.fromisoformat`.
datetime(*(time.strptime(date_string, format)[0:6])) :exc:`ValueError` is raised if the date_string and format can't be parsed by :func:`time.strptime` or if it returns a value which isn't a time tuple. See also :ref:`strftime-strptime-behavior` and :meth:`datetime.fromisoformat`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
daaf1b5e-5962-490f-b10d-a56ddb39e3a6
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,847
supabase-export-v2
84bb11439bbdd9cd
``%H:%M``. | 10:01 | | +-----------+--------------------------------+------------------------+-------+ | ``%S`` | Second as a zero-padded | 00, 01, ..., 59 | \(4), | | | decimal number. | | \(9) | +-----------+--------------------------------+------------------------+-------+ | ``%t`` | The tab character (``'\t'``). | ...
trusted_official_docs
CPython Docs
``%H:%M``. | 10:01 | | +-----------+--------------------------------+------------------------+-------+ | ``%S`` | Second as a zero-padded | 00, 01, ..., 59 | \(4), | | | decimal number. | | \(9) | +-----------+--------------------------------+------------------------+-------+ | ``%t`` | The tab character (``'\t'``). | ...
``%H:%M``. | 10:01 | | +-----------+--------------------------------+------------------------+-------+ | ``%S`` | Second as a zero-padded | 00, 01, ..., 59 | \(4), | | | decimal number. | | \(9) | +-----------+--------------------------------+------------------------+-------+ | ``%t`` | The tab character (``'\t'``). | ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
db7098da-22e2-493a-b35b-27f9c15d20a7
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,325
supabase-export-v2
d27fe057e5d5f7e6
now supported, as are remainder operations and the :func:`divmod` function. True division and multiplication of a :class:`!timedelta` object by a :class:`float` object are now supported. :class:`timedelta` objects support equality and order comparisons.
trusted_official_docs
CPython Docs
now supported, as are remainder operations and the :func:`divmod` function. True division and multiplication of a :class:`!timedelta` object by a :class:`float` object are now supported. :class:`timedelta` objects support equality and order comparisons.
now supported, as are remainder operations and the :func:`divmod` function. True division and multiplication of a :class:`!timedelta` object by a :class:`float` object are now supported. :class:`timedelta` objects support equality and order comparisons.
python, official-docs, cpython, P0
Local_Trusted_Corpus