Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
utils.cpython-313.pyc52 linesDownload Raw Back to __pycache__
1�

2��j���:�SrSSKJr SSKJrJr SSjrSrSrg)	zs3This module offers general convenience and utility functions for dealing with4datetimes.5 6.. versionadded:: 2.7.07�)�unicode_literals)�datetime�timeNc��[R"U5n[R"UR5[	SUS95$)a8Returns a :py:class:`datetime` representing the current day at midnight9 10:param tzinfo:11    The time zone to attach (also used to determine the current day).12 13:return:14    A :py:class:`datetime.datetime` object representing the current day15    at midnight.16r��tzinfo)r�now�combine�dater)r�dts  �TD:\code\apps\devtools\python\user_packages\Python313\site-packages\dateutil/utils.py�todayr
s2��17���f�	�B����B�G�G�I�t�A�f�'=�>�>�c�>�URbU$URUS9$)aP18Sets the ``tzinfo`` parameter on naive datetimes only19 20This is useful for example when you are provided a datetime that may have21either an implicit or explicit time zone, such as when parsing a time zone22string.23 24.. doctest::25 26    >>> from dateutil.tz import tzoffset27    >>> from dateutil.parser import parse28    >>> from dateutil.utils import default_tzinfo29    >>> dflt_tz = tzoffset("EST", -18000)30    >>> print(default_tzinfo(parse('2014-01-01 12:30 UTC'), dflt_tz))31    2014-01-01 12:30:00+00:0032    >>> print(default_tzinfo(parse('2014-01-01 12:30'), dflt_tz))33    2014-01-01 12:30:00-05:0034 35:param dt:36    The datetime on which to replace the time zone37 38:param tzinfo:39    The :py:class:`datetime.tzinfo` subclass instance to assign to40    ``dt`` if (and only if) it is naive.41 42:return:43    Returns an aware :py:class:`datetime.datetime`.44r)r�replace)rrs  r
�default_tzinfors$��:45�y�y���	��z�z��z�(�(rc�L�[U5nX-46nU*Us=:*=(a U:*$s $)zb47Useful for comparing two datetimes that may have a negligible difference48to be considered equal.49)�abs)�dt1�dt2�delta�50differences    r
�within_deltar@s/��51
��J�E���J��6�Z�(�(�5�(�(�(�(r)N)�__doc__�52__future__rrrrrr�rr
�<module>rs"���(�#�
?�  )�F)r
codekingpro/portable-devtools · Team Ai