Files
sirh/venv/lib/python3.12/site-packages/dateutil/__pycache__/utils.cpython-312.pyc

52 lines
2.5 KiB
Plaintext
Raw Normal View History

2026-04-29 11:52:03 +02:00
<EFBFBD>
<00><><EFBFBD>i<EFBFBD><00><00>8<00>dZddlmZddlmZmZdd<05>Zd<06>Zd<07>Zy) zs
This module offers general convenience and utility functions for dealing with
datetimes.
.. versionadded:: 2.7.0
<EFBFBD>)<01>unicode_literals)<02>datetime<6D>timeNc<00><><00>tj|<00>}tj|j<00>t d|<00><02><00>S)a
Returns a :py:class:`datetime` representing the current day at midnight
:param tzinfo:
The time zone to attach (also used to determine the current day).
:return:
A :py:class:`datetime.datetime` object representing the current day
at midnight.
r<00><01>tzinfo)r<00>now<6F>combine<6E>dater)r<00>dts <20>K/home/fatima/modif/sirh/venv/lib/python3.12/site-packages/dateutil/utils.py<70>todayr s2<00><00>
<12><1C><1C>f<EFBFBD> <1D>B<EFBFBD> <13> <1B> <1B>B<EFBFBD>G<EFBFBD>G<EFBFBD>I<EFBFBD>t<EFBFBD>A<EFBFBD>f<EFBFBD>'=<3D> ><3E>><3E>c<00>B<00>|j<00>|S|j|<01><01>S)a<>
Sets the ``tzinfo`` parameter on naive datetimes only
This is useful for example when you are provided a datetime that may have
either an implicit or explicit time zone, such as when parsing a time zone
string.
.. doctest::
>>> from dateutil.tz import tzoffset
>>> from dateutil.parser import parse
>>> from dateutil.utils import default_tzinfo
>>> dflt_tz = tzoffset("EST", -18000)
>>> print(default_tzinfo(parse('2014-01-01 12:30 UTC'), dflt_tz))
2014-01-01 12:30:00+00:00
>>> print(default_tzinfo(parse('2014-01-01 12:30'), dflt_tz))
2014-01-01 12:30:00-05:00
:param dt:
The datetime on which to replace the time zone
:param tzinfo:
The :py:class:`datetime.tzinfo` subclass instance to assign to
``dt`` if (and only if) it is naive.
:return:
Returns an aware :py:class:`datetime.datetime`.
r)r<00>replace)r rs r <00>default_tzinfors$<00><00>:
<EFBFBD>y<EFBFBD>y<EFBFBD><1C><11> <09><11>z<EFBFBD>z<EFBFBD><16>z<EFBFBD>(<28>(rc<00>D<00>t|<02>}||z
}| |cxkxr|kScS)zn
Useful for comparing two datetimes that may have a negligible difference
to be considered equal.
)<01>abs)<04>dt1<74>dt2<74>delta<74>
differences r <00> within_deltar@s.<00><00>
<10><05>J<EFBFBD>E<EFBFBD><14>s<EFBFBD><19>J<EFBFBD> <11>6<EFBFBD>Z<EFBFBD> (<28>5<EFBFBD> (<28>(<28> (<28>(r)N)<08>__doc__<5F>
__future__rrrrrr<00>rr <00><module>rs"<00><01><04> (<28>#<23> ?<3F> )<29>F)r