
    mBNjW             
         U d Z ddlmZ ddlZddlmZmZ	m
ZmZmZmZ ddlmZ ddlmZ ddl
mZmZmZ dd	lmZ dd
l m!Z" ddl#m$Z%m&Z' ddl(m)Z*m+Z,m-Z. ej^                  rddl0m1Z2 nddl m1Z2 	 g dZ4dZ5de6d<   dZ7de6d<   dZ8de6d<   dZ9de6d<    ed      Z:de6d<    ed      Z;de6d<    ed      Z<de6d<   dZ=de6d <   d!Z>de6d"<   d#Z?de6d$<    ej*                  d%      Z@de6d&<   d' ZA eBe8e9dz         D  ci c]  } |  eA|        c} ZCd( ZD eBe8e9dz         D  ci c]  } |  eD|        c} ZEd) ZF eBe8e9dz         D  ci c]  }  eBdd*      D ]  }| |f eF| |        c}} ZGd+ ZH G d, d-eI      ZJ G d. d/      ZKej^                  reZLneMZL G d0 d1eIeNeNeNeNf   eL      ZO eOe5d2      eO_P         eOe7d32      eO_Q        ej^                  reZRneMZR G d4 d5eRe,6      ZSeSj                  d      eS_P        eSj                  d7      eS_Q         eOd8      eS_U        eMj                  eS      ZWej^                  reZXneMZX	 dJ	 	 	 	 	 dKd9ZYdLd:ZZ G d; d<eXe.6      Z[ e[dddd=      e[_P         e[d>d?d?d3=      e[_Q         eOd@      e[_U        e[j                  Z\dAe6dB<    e[dCD      Z]dAe6dE<   ej^                  re	Z^neMZ^e G dF dGe^e*6             Z_e_j                  eSj                  e[j                        e__P        e_j                  eSj                  e[j                        e__Q        e[j                  e__U        e_j                  eWe\      Za e_dHddddd      ZbeJZcej^                  s[JdI Zdyc c} w c c} w c c}} w )Mz
Fundamental temporal types for interchange with the DBMS.

This module contains the fundamental types used for temporal accounting as well
as a number of utility functions.
    )annotationsN)datedatetimetime	timedeltatimezonetzinfo)total_ordering)compile)gmtimemktimestruct_time   )_typing)deprecation_warn   )round_half_to_evensymmetric_divmod)DateTimeTypeDateTypeTimeType)
deprecated)	MAX_INT64MAX_YEAR	MIN_INT64MIN_YEARDateDateTimeDurationMiddayMidnightNeverTime	UnixEpochZeroDatel         z_t.Final[int]r   l    r   r   i'  r   z^(\d{4})-(\d{2})-(\d{2})$z_t.Final[_re.Pattern]_DATE_ISO_PATTERNzV^(\d{2})(:(\d{2})(:((\d{2})(\.\d*)?))?)?(([+-])(\d{2}):(\d{2})(:((\d{2})(\.\d*)?))?)?$_TIME_ISO_PATTERNz^P(?!$)(?:(?P<years>[+-]?\d+)Y)?(?:(?P<months>[+-]?\d+)M)?(?:(?P<days>[+-]?\d+)D)?(T(?!$)(?:(?P<hours>[+-]?\d+)H)?(?:(?P<minutes>[+-]?\d+)M)?(?:(?P<seconds>[+-]?\d+)(?P<sub_seconds>[.,]\d+)?S)?)?$|^P(?P<weeks>[+-]?\d+)W$_DURATION_ISO_PATTERN ʚ;_NANO_SECONDSir ( _AVERAGE_SECONDS_IN_MONTHQ _AVERAGE_SECONDS_IN_DAYz(?<!%)%f_FORMAT_F_REPLACEc                6    | dz  dk7  ry| dz  dk7  ry| dz  dk(  S )N   r   Fd   Ti   years    d/Users/ahmed/devFolder/Ultron/claude-voice/.venv/lib/python3.12/site-packages/neo4j/time/__init__.py_is_leap_yearr6   ~   s,    ax1}czQ#:?    c                    t         |    rdS dS )Nin  im  _IS_LEAP_YEARr3   s    r5   _days_in_yearr;      s    %3.3.r7   c                2    |dv ry|dk7  ryt         |    rdS dS )N>   r0      	         r            r9   r4   months     r5   _days_in_monthrF      s)    	!"4(r0b0r7      c                J   | t         k  s	| t        kD  rt        dt          dt         d      |dk  s|dkD  rt        d      t        | |f   }||dhv r| |dfS ||dz
  dhv r| |dfS ||d	z
  d
hv r| |d
fS d|cxk  r|dz
  k  rn n| |t	        |      fS t        d| d| d      )a  
    Coerce the day of the month to an internal value.

    That value may or may not match the "public" value.

    Except for the last three days of every month, all days are stored as-is.
    The last three days are instead stored as -1 (the last), -2 (the second to
    last) and -3 (the third to last).

    Therefore, for a 28-day month, the last week is as follows:

        Day   | 22 23 24 25 26 27 28
        Value | 22 23 24 25 -3 -2 -1

    For a 29-day month, the last week is as follows:

        Day   | 23 24 25 26 27 28 29
        Value | 23 24 25 26 -3 -2 -1

    For a 30-day month, the last week is as follows:

        Day   | 24 25 26 27 28 29 30
        Value | 24 25 26 27 -3 -2 -1

    For a 31-day month, the last week is as follows:

        Day   | 25 26 27 28 29 30 31
        Value | 25 26 27 28 -3 -2 -1

    This slightly unintuitive system makes some temporal arithmetic
    produce a more desirable outcome.

    :param year:
    :param month:
    :param day:
    :returns:
    Year out of range (..)r      Month out of range (1..12)r      zDay z out of range (1..z, -1, -2 ,-3))r   r   
ValueError_DAYS_IN_MONTHint)r4   rE   daydays_in_months       r5   _normalize_dayrW      s    L h$/.xj8*AFGGqyEBJ566"4;/M
}b!!UB
}q "%%UB
}q "%%UBC$=1$$UCH$$

se%m_MB r7   c                  L    e Zd ZdZd	d
dZd Zd Zd Zed        Z	ed        Z
y)	ClockTimea  
    A count of ``seconds`` and ``nanoseconds``.

    This class can be used to mark a particular point in time, relative to an
    externally-specified epoch.

    The ``seconds`` and ``nanoseconds`` values provided to the constructor can
    can have any sign but will be normalized internally into a positive or
    negative ``seconds`` value along with a positive ``nanoseconds`` value
    between ``0`` and ``999,999,999``. Therefore, ``ClockTime(-1, -1)`` is
    normalized to ``ClockTime(-2, 999999999)``.

    Note that the structure of a :class:`.ClockTime` object is similar to
    the ``timespec`` struct in C.

    .. deprecated:: 6.0
        :class:`ClockTime` is an implementation detail.
        It and its related methods will be removed in a future version.
    c                    t        t        t        |z        t        |      z   t              \  }}t        j	                  | ||f      S N)divmodrT   r*   tuple__new__)clssecondsnanosecondss      r5   r^   zClockTime.__new__   sB    %'(3{+;;] 
 }}S7K"899r7   c                   t        |t        t        f      rt        |      }t        |t              r:t        | j                  |j                  z   | j
                  |j
                  z         S t        |t              rf|j                  s|j                  rt        d      t        | j                  |j                  z   | j
                  t        |j
                        z         S t        S )Nz'Cannot add Duration with months or days
isinstancerT   float
_ClockTimer`   ra   r   monthsdaysrR   NotImplementedselfothers     r5   __add__zClockTime.__add__   s    ec5\*u%EeZ(u}},  5#4#44  eX&||uzz !JKKu}},  3u'8'8#99  r7   c                   t        |t        t        f      rt        |      }t        |t              r:t        | j                  |j                  z
  | j
                  |j
                  z
        S t        |t              rf|j                  s|j                  rt        d      t        | j                  |j                  z
  | j
                  t        |j
                        z
        S t        S )Nz,Cannot subtract Duration with months or daysrc   rj   s     r5   __sub__zClockTime.__sub__
  s    ec5\*u%EeZ(u}},  5#4#44  eX&||uzz B  u}},  3u'8'8#99  r7   c                    | \  }}d|d|dS )Nzneo4j.time.ClockTime(seconds=, nanoseconds=rK   r2   )rk   snss      r5   __repr__zClockTime.__repr__  s     2.qe>"qIIr7   c                    | d   S Nr   r2   rk   s    r5   r`   zClockTime.seconds!      Awr7   c                    | d   S )Nr   r2   rw   s    r5   ra   zClockTime.nanoseconds%  rx   r7   N)r   r   )r`   re   ra   rT   returnrY   )__name__
__module____qualname____doc__r^   rm   ro   rt   propertyr`   ra   r2   r7   r5   rY   rY      sD    (:"&J    r7   rY   c                  V    e Zd ZdZdZd Zed        Zed        Zed        Z	d Z
d Zy)	_Clocka  
    Accessor for time values.

    This class is fulfilled by implementations
    that subclass :class:`.Clock`. These implementations are contained within
    the ``neo4j.time._clock_implementations`` module, and are not intended to
    be accessed directly.

    Creating a new :class:`.Clock` instance will produce the highest
    precision clock implementation available.

        >>> clock = _Clock()
        >>> type(clock)                                        # doctest: +SKIP
        neo4j.time.clock_implementations.LibCClock
        >>> clock.local_time()                                 # doctest: +SKIP
        ClockTime(seconds=1525265942, nanoseconds=506844026)
    Nc                    | j                   3ddlm} t        d t        j                         D        d d      | _         | j                   st        d      t        j                  | j                   d         S )	Nr   )_clock_implementationsc              3  @   K   | ]  }|j                         r|  y wr[   )	available).0clocks     r5   	<genexpr>z!_Clock.__new__.<locals>.<genexpr>G  s"      !8( !8s   c                "    | j                         S r[   )	precision)r   s    r5   <lambda>z _Clock.__new__.<locals>.<lambda>L  s    %//"3r7   T)keyreversez"No clock implementations availabler   )	_Clock__implementations r   sortedr   __subclasses__RuntimeErrorobjectr^   )r_   r   s     r5   r^   z_Clock.__new__?  sq      ( %+!'!6!6!8
 4%C! $$CDD~~c33A677r7   c                    t        d      )a  
        Return precision (decimal places) of this clock implementation.

        The precision of this clock implementation, represented as a
        number of decimal places. Therefore, for a nanosecond precision
        clock, this function returns ``9``.
         No clock implementation selectedNotImplementedErrorr_   s    r5   r   z_Clock.precisionS  s     ""DEEr7   c                    t        d      )z
        Indicate whether this clock implementation is available.

        A boolean flag to indicate whether this clock implementation is
        available on this platform.
        r   r   r   s    r5   r   z_Clock.available^  s     ""DEEr7   c           	     V    t        t        t        t        d                   dz         S )a&  
        Get the UTC offset of the local time.

        The offset from UTC for local time read from this clock.
        This may raise OverflowError if not supported, because of platform
        dependent C libraries.

        :returns:
        :rtype:

        :raises OverflowError:
        i  )rf   rT   _mktime_gmtimer   s    r5   local_offsetz_Clock.local_offseth  s%    " 3wwv7886ABBr7   c                D    | j                         | j                         z   S )a[  
        Get the current local time relative to the Unix Epoch.

        Read and return the current local time from this clock, measured
        relative to the Unix Epoch. This may raise OverflowError if not
        supported, because of platform dependent C libraries.

        :returns:
        :rtype:

        :raises OverflowError:
        )utc_timer   rw   s    r5   
local_timez_Clock.local_time{  s     }}!2!2!444r7   c                    t        d      )z}
        Read and return the current UTC time from this clock.

        Time is measured relative to the Unix Epoch.
        r   r   rw   s    r5   r   z_Clock.utc_time  s     ""DEEr7   )r{   r|   r}   r~   r   r^   classmethodr   r   r   r   r   r2   r7   r5   r   r   *  sa    $ 8( F F F F C C$5Fr7   r   c                     e Zd ZU dZdZded<   	 dZded<   	 	 	 	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZd dZeZ		 	 	 	 d!dZ
d!d	Zd"d
Zd#dZd#dZ	 	 	 	 d$dZd"dZd%dZd%dZd%dZd&dZd&dZd Zed        Zed'd       ZeZd(d)dZed*d       Zed*d       Zed*d       Zed*d       Z ed+d       Z!ed,d       Z"y)-r   aE	  
    A difference between two points in time.

    A :class:`.Duration` represents the difference between two points in
    time. Duration objects store a composite value of ``months``, ``days``,
    ``seconds``, and ``nanoseconds``. Unlike :class:`datetime.timedelta`
    however, days, and seconds/nanoseconds are never interchanged. All values
    except seconds and nanoseconds are applied separately in calculations
    (element-wise).

    A :class:`.Duration` stores four primary instance attributes internally:
    ``months``, ``days``, ``seconds`` and ``nanoseconds``. These are maintained
    as individual values and are immutable. Each of these four attributes can
    carry its own sign, except for ``nanoseconds``, which always has the same
    sign as ``seconds``. The constructor will establish this state, should the
    duration be initialized with conflicting ``seconds`` and ``nanoseconds``
    signs. This structure allows the modelling of durations such as
    ``3 months minus 2 days``.

    To determine if a :class:`Duration` ``d`` is overflowing the accepted
    values of the database, first, all ``nanoseconds`` outside the range
    -999_999_999 and 999_999_999 are transferred into the seconds field. Then,
    ``months``, ``days``, and ``seconds`` are summed up like so:
    ``months * 2629746 + days * 86400 + d.seconds
    + d.nanoseconds // 1000000000``.
    (Like the integer division in Python, this one is to be understood as
    rounding down rather than towards 0.)
    This value must be between -(2\ :sup:`63`) and (2\ :sup:`63` - 1)
    inclusive.

    :param years: will be added times 12 to ``months``
    :param months: will be truncated to :class:`int` (``int(months)``)
    :param weeks: will be added times 7 to ``days``
    :param days: will be truncated to :class:`int` (``int(days)``)
    :param hours: will be added times 3,600,000,000,000 to ``nanoseconds``
    :param minutes: will be added times 60,000,000,000 to ``nanoseconds``
    :param seconds: will be added times 1,000,000,000 to ``nanoseconds``
    :param milliseconds: will be added times 1,000,000 to ``nanoseconds``
    :param microseconds: will be added times 1,000 to ``nanoseconds``
    :param nanoseconds:
        will be truncated to :class:`int` (``int(nanoseconds)``)

    :raises ValueError: the components exceed the limits as described above.
    N_t.Final[Duration]minmaxc                   t        d|z  |z         }|t        k  s	|t        kD  rt        d      t        d|z  |z         }t        d|z        t        d|z        z   t        d|z        z   t        d|z        z   t        d|	z        z   t        |
      z   }t	        |t
              \  }}||||f}|t        z  |t        z  z   |z   |d	k  rd
nd	z
  }t        |cxk  r	t        k  sn t        d|      t        j                  | |      S )NrL   zMonths value out of range        qa    Xp7 r)   i@B   r   r   zDuration value out of range: )
rT   r   r   rR   _symmetric_divmodr*   r+   r-   r]   r^   )r_   yearsrg   weeksrh   hoursminutesr`   millisecondsmicrosecondsra   modrs   rr   tuple_avg_total_secondss                    r5   r^   zDuration.__new__  s9    ef$%	>R)^899E	D !%&+'()*w&'( 'L()* $%&	'
 + 	 ""m42aB**))* Fq# 	 -::<VJGHH}}S&))r7   c                4    t        t        t        |             S )z-Falsy if all primary instance attributes are.)anymapboolrw   s    r5   __bool__zDuration.__bool__  s    3tT?##r7   c           	        t        |t              rst        | d   t        |j                        z   | d   t        |j                        z   | d   t        |j
                        z   | d   t        |j                        z         S t        |t              rEt        | d   | d   |j                  z   | d   |j
                  z   | d   |j                  dz  z         S t        S )z8Add a :class:`.Duration` or :class:`datetime.timedelta`.r   r   r   rQ   rg   rh   r`   ra   r   
rd   r   rT   rg   rh   r`   ra   
_timedeltar   ri   rj   s     r5   rm   zDuration.__add__  s     eX&AwU\\!22!Ws5::.Q#emm"44 Gc%*;*;&<<	  eZ(Aw!Wuzz)Q%--/ Ge&8&84&??	  r7   c           	        t        |t              rst        | d   t        |j                        z
  | d   t        |j                        z
  | d   t        |j
                        z
  | d   t        |j                        z
        S t        |t              rEt        | d   | d   |j                  z
  | d   |j
                  z
  | d   |j                  dz  z
        S t        S )z=Subtract a :class:`.Duration` or :class:`datetime.timedelta`.r   r   r   rQ   r   r   r   rj   s     r5   ro   zDuration.__sub__  s    eX&AwU\\!22!Ws5::.Q#emm"44 Gc%*;*;&<<	  eZ(Aw!Wuzz)Q%--/ Ge&8&84&??	  r7   c           	         t        |t        t        f      rKt        t	        | d   |z        t	        | d   |z        t	        | d   t
        z  |z  | d   |z  z               S t        S )ar  
        Multiply by an :class:`int` or :class:`float`.

        The operation is performed element-wise on
        ``(months, days, nanaoseconds)`` where

        * years go into months,
        * weeks go into days,
        * seconds and all sub-second units go into nanoseconds.

        Each element will be rounded to the nearest integer (.5 towards even).
        r   r   r   rQ   rg   rh   ra   rd   rT   re   r   _round_half_to_evenr*   ri   rj   s     r5   __mul__zDuration.__mul__$  m     ec5\**47U?;(a59/Gm+e3d1goE  r7   c                    t        |t              r-t        | d   |z  | d   |z  | d   t        z  | d   z   |z        S t        S )aL  
        Integer division by an :class:`int`.

        The operation is performed element-wise on
        ``(months, days, nanaoseconds)`` where

        * years go into months,
        * weeks go into days,
        * seconds and all sub-second units go into nanoseconds.

        Each element will be rounded towards -inf.
        r   r   r   rQ   r   rd   rT   r   r*   ri   rj   s     r5   __floordiv__zDuration.__floordiv__;  sU     eS!Aw%'!W%!!W}4tAw>5H 
 r7   c                    t        |t              r-t        | d   |z  | d   |z  | d   t        z  | d   z   |z        S t        S )a  
        Modulo operation by an :class:`int`.

        The operation is performed element-wise on
        ``(months, days, nanaoseconds)`` where

        * years go into months,
        * weeks go into days,
        * seconds and all sub-second units go into nanoseconds.
        r   r   r   rQ   r   r   rj   s     r5   __mod__zDuration.__mod__P  sS     eS!Aw!Wu_!!W}4tAw>%G 
 r7   c                r    t        |t              r"| j                  |      | j                  |      fS t        S )zz
        Division and modulo operation by an :class:`int`.

        See :meth:`__floordiv__` and :meth:`__mod__`.
        )rd   rT   r   r   ri   rj   s     r5   
__divmod__zDuration.__divmod__c  s3     eS!$$U+T\\%-@@@r7   c           	         t        |t        t        f      rKt        t	        | d   |z        t	        | d   |z        t	        | d   t
        z  |z  | d   |z  z               S t        S )ar  
        Division by an :class:`int` or :class:`float`.

        The operation is performed element-wise on
        ``(months, days, nanaoseconds)`` where

        * years go into months,
        * weeks go into days,
        * seconds and all sub-second units go into nanoseconds.

        Each element will be rounded to the nearest integer (.5 towards even).
        r   r   r   rQ   r   r   rj   s     r5   __truediv__zDuration.__truediv__o  r   r7   c                    | S r[   r2   rw   s    r5   __pos__zDuration.__pos__  s    r7   c                @    t        | d    | d    | d    | d          S Nr   r   r   rQ   r   )r   rw   s    r5   __neg__zDuration.__neg__  s3    G8q'!WHa	
 	
r7   c           	         t        t        | d         t        | d         t        | d         t        | d               S r   )r   absrw   s    r5   __abs__zDuration.__abs__  s;    tAw<T!WQLDG	
 	
r7   c           	     .    | \  }}}}d|d|d|d|d	S )Nzneo4j.time.Duration(months=z, days=z
, seconds=rq   rK   r2   )rk   r   rU   secrs   s        r5   rt   zDuration.__repr__  sE    CbV 7 g &	
r7   c                "    | j                         S r[   
iso_formatrw   s    r5   __str__zDuration.__str__        r7   c                Z    t        |       j                  t        |       | j                  ffS r[   )type_restorer]   __dict__rw   s    r5   
__reduce__zDuration.__reduce__  s$    Dz""U4[$--$@@@r7   c                l    t         j                  | |      }|r|j                  j                  |       |S r[   )r]   r^   r   update)r_   elementsdict_instances       r5   r   zDuration._restore  s.    ==h/$$U+r7   c                   t         j                  |      }|r5|j                  d      r! | t        |j                  d                  S d}|j                  d      r-t        |j                  d      dd j	                  dd            }t        |j                  d	      xs d      }|dk  r|d
z  } | t        |j                  d      xs d      t        |j                  d      xs d      t        |j                  d      xs d      t        |j                  d      xs d      t        |j                  d      xs d      ||      S t        d      )a  
        Parse a ISO formatted duration string.

        Accepted formats (all lowercase letters are placeholders):
            'P', a zero length duration
            'PyY', y being a number of years
            'PmM', m being a number of months
            'PwW', d being a number of weeks
            'PdD', d being a number of days

            Any combination of the above, e.g., 'P25Y1D' for 25 years and 1
            day.
            Except for weeks, which cannot be combined with any other
            components.

            'PThH', h being a number of hours
            'PTmM', h being a number of minutes
            'PTsS', h being a number of seconds
            'PTs.sss...S', h being a fractional number of seconds

            Any combination of the above, e.g. 'PT5H1.2S' for 5 hours and 1.2
            seconds.
            Any combination of all options, e.g. 'P13MT100M' for 13 months and
            100 minutes.
            Except for weeks, which cannot be combined with any other
            components.

        :param s: String to parse

        :raises ValueError: if the string does not match the required format.
        r   )r   r   sub_secondsr   
   r>   0r`   rN   r   rg   rh   r   r   )r   rg   rh   r   r   r`   ra   z%Duration string must be in ISO format)r(   matchgrouprT   ljustrR   )r_   rr   r   rs   r`   s        r5   from_iso_formatzDuration.from_iso_format  s,   B &++A.{{7#U[[%9!:;;B{{=)]3Ab9??3GH%++i05A6G{b%++g.3!45;;x05A6V,12%++g.3!4EKK	27a8  @AAr7   c                :   g }| j                   \  }}}}|r|j                  | d       |r|j                  | d       |r|dk\  rG|dk\  rBt        |      j                  dd      j	                  d      }|j                  | d| d       n|dk  rZ|dk  rUt        t        |            j                  dd      j	                  d      }|j                  dt        |       d| d       n!t        d	      |r|j                  | d       |r|j                  d|       | j                  \  }}	}
|
r|j                  d|
 d
       |	r|j                  d|	 d       |r|j                  d| d       |r#|j                  dd       dj                  |      S y)z
        Return the :class:`Duration` as ISO formatted string.

        :param sep: the separator before the time components.
        HMr   r>   r   .S-zPlease report this issueDYPr   PT0S)
!hours_minutes_seconds_nanosecondsappendstrrjustrstripr   AssertionErrorinsertyears_months_daysjoin)rk   seppartsr   r   r`   ra   ns_strr   rg   rh   s              r5   r   zDuration.iso_format  s    22 	-w LLE7!%LLG9A'!|q 0[)//37>>sCy&34A+"2S-.44Q<CCCHqWaxq9: %%?@@LLG9A'LLC "44vtLLtfAJ'LLvhaL)LLugQK(LLC 775>!r7   c                    | d   S )z$The months of the :class:`Duration`.r   r2   rw   s    r5   rg   zDuration.months       Awr7   c                    | d   S )z"The days of the :class:`Duration`.r   r2   rw   s    r5   rh   zDuration.days  r  r7   c                    | d   S )z%The seconds of the :class:`Duration`.r   r2   rw   s    r5   r`   zDuration.seconds  r  r7   c                    | d   S )z)The nanoseconds of the :class:`Duration`.rQ   r2   rw   s    r5   ra   zDuration.nanoseconds!  r  r7   c                6    t        | d   d      \  }}||| d   fS )zd
        Months and days components as a 3-tuple.

        tuple of years, months and days.
        r   rL   r   r   )rk   r   rg   s      r5   r  zDuration.years_months_days&  s)     *$q'26vfd1g%%r7   c                V    t        | d   d      \  }}t        |d      \  }}|||| d   fS )z}
        Seconds and nanoseconds components as a 4-tuple.

        tuple of hours, minutes, seconds and nanoseconds.
        r   <   rQ   r  )rk   r   r`   r   s       r5   r   z*Duration.hours_minutes_seconds_nanoseconds0  s<     -T!Wb9*7B7wgwQ//r7   )
r   r   r   r   r   r   r   r   r   r   )r   re   rg   re   r   re   rh   re   r   re   r   re   r`   re   r   re   r   re   ra   re   rz   r   )rz   r   )rl   Duration | _timedeltarz   r   )rl   re   rz   r   )rl   rT   rz   r   )rl   rT   rz   ztuple[Duration, Duration])rz   r   rz   r   )rr   r   rz   r   Tr  r   rz   r   rz   rT   rz   ztuple[int, int, int]rz   ztuple[int, int, int, int])#r{   r|   r}   r~   r   __annotations__r   r^   r   __nonzero__rm   ro   r   r   r   r   r   r   r   r   rt   r   r   r   r   r   fromisoformatr   r   rg   rh   r`   ra   r  r   r2   r7   r5   r   r     s   +^ #C	"-"C	". #*#* #* 	#*
 #* #* #* #* #* #* #* 
#*J$ K*	($.*&

	"
.

	
!A   3B 3Bj $M'R         & & 0 0r7   r   )r`   ra   iɚ;c                     e Zd ZU dZd@dZedAd       ZedBdCd       ZedDd       Ze	 dB	 	 	 	 	 dEd       Z	edFd       Z
edGd	       ZedHd
       ZedHd       ZedId       Ze ed      	 	 	 	 	 	 dJd              Ze	 	 	 	 	 	 dJd       ZedKd       ZedLd       ZedMd       Zed        Zej.                  r+edHd       ZedGd       Ze	 dB	 	 	 	 	 dEd       ZedFd       ZdZded<   	 dZded<   	 dZded<   	 dZ dZ!dZ"dZ#e$dNd       Z%e$dNd       Z&e$dNd        Z'e$dOd!       Z(e$dOd"       Z)e$dPd#       Z*d$ Z+dQd%Z,dRd&Z-dRd'Z.dRd(Z/dRd)Z0dSd*Z1ejd                  dTd+       Z3ejd                  dSd,       Z3d- Z3d. Z4edDd/       Z5ej.                  r	 	 	 dU	 	 	 	 	 	 	 	 	 dVd0Z6ndDd1Z6dWd2Z7dNd3Z8 ed      dXd4       Z9dXd5Z:dYd6Z;dNd7Z<dNd8Z=dOd9Z>dZd:Z?dZd;Z@dZd<ZAd= ZBd> ZCej.                  rdOd?Z>e?ZDe=ZEeBZFe8ZGe7ZHyy)[r   a  
    Idealized date representation.

    A :class:`.Date` object represents a date (year, month, and day) in the
    `proleptic Gregorian Calendar
    <https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar>`_.

    Years between ``0001`` and ``9999`` are supported, with additional
    support for the "zero date" used in some contexts.

    Each date is based on a proleptic Gregorian ordinal, which models 1 Jan
    0001 as ``day 1`` and counts each subsequent day up to, and including,
    31 Dec 9999. The standard ``year``, ``month`` and ``day`` value of each
    date is also available.

    Internally, the day of the month is always stored as-is, except for the
    last three days of that month. These are always stored as -1, -2 and -3
    (counting from the last day). This system allows some temporal
    arithmetic (particularly adding or subtracting months) to produce a more
    desirable outcome than would otherwise be produced. Externally, the day
    number is always the same as would be written on a calendar.

    :param year: the year. Minimum :data:`.MIN_YEAR` (0001), maximum
        :data:`.MAX_YEAR` (9999).
    :type year: int
    :param month: the month. Minimum 1, maximum 12.
    :type month: int
    :param day: the day. Minimum 1, maximum
        :attr:`Date.days_in_month(year, month) <Date.days_in_month>`.
    :type day: int

    A zero date can also be acquired by passing all zeroes to the
    :class:`.Date` constructor or by using the :data:`ZeroDate`
    constant.
    c                    ||cxk(  r|cxk(  r
dk(  rt         S  t        |||      \  }}}| j                  |||      }| j                  ||||      S rv   )r%   rW   _Date__calc_ordinal
_Date__new)r_   r4   rE   rU   ordinals        r5   r^   zDate.__new__t  s\    5$C$1$O %)$s;eS$$T5#6yy$s33r7   c                    t         j                  |       }t        |      |_        t        |      |_        t        |      |_        t        |      |_        |S r[   )r   r^   rT   _Date__ordinal_Date__year_Date__month
_Date__day)r_   r  r4   rE   rU   r   s         r5   __newz
Date.__new{  sC    >>#& \d)u:Sr7   Nc                    |,| j                  t               j                         t              S t        j                         j                  t        j                        j                  |      j                         S )uO  
        Get the current date.

        :param tz: timezone or None to get the local :class:`.Date`.

        :raises OverflowError: if the timestamp is out of the range of values
            supported by the platform C localtime() function. It’s common for
            this to be restricted to years from 1970 through 2038.
        r	   )_from_clock_timer   r   r$   r   utc_nowreplace	_timezoneutc
astimezoner   r_   tzs     r5   todayz
Date.today  sZ     :''(;(;(=yII   "	.B	r7   c                Z    | j                  t               j                         t              S )z'Get the current date as UTC local date.r(  r   r   r$   r   s    r5   	utc_todayzDate.utc_today  "     ##FH$5$5$7CCr7   c                L    | j                  t        j                  ||            S )u  
        Construct :class:`.Date` from a time stamp (seconds since unix epoch).

        :param timestamp: the unix timestamp (seconds since unix epoch).
        :param tz: timezone. Set to None to create a local :class:`.Date`.

        :raises OverflowError: if the timestamp is out of the range of values
            supported by the platform C localtime() function. It’s common for
            this to be restricted to years from 1970 through 2038.
        )from_native	_datetimefromtimestampr_   	timestampr/  s      r5   from_timestampzDate.from_timestamp  s      y66y"EFFr7   c                2    | j                  |dft              S )z
        Construct :class:`.Date` from a time stamp (seconds since unix epoch).

        :returns: the :class:`Date` as local date :class:`Date` in UTC.
        r   r(  r$   r_   r:  s     r5   utc_from_timestampzDate.utc_from_timestamp       ##YNI>>r7   c                    |dk(  rt         S |dk  s|dkD  rt        d      t        j                  |      }t	        |j
                  |j                  |j                        \  }}}| j                  ||||      S )a  
        Construct :class:`.Date` from the proleptic Gregorian ordinal.

        ``0001-01-01`` has ordinal 1 and ``9999-12-31`` has ordinal 3,652,059.
        Values outside of this range trigger a :exc:`ValueError`.
        The corresponding instance method for the reverse date-to-ordinal
        transformation is :meth:`.to_ordinal`.
        The ordinal 0 has a special semantic and will return :attr:`ZeroDate`.

        :raises ValueError: if the ordinal is outside the range [0, 3652059]
            (both values included).
        r   ۹7 z!Ordinal out of range (0..3652059))	r%   rR   r7  fromordinalrW   r4   rE   rU   r  )r_   r  r   r4   rE   rU   s         r5   from_ordinalzDate.from_ordinal  sp     a<Oq[Gg-@AA!!'*)!&&!''155AeSyy$s33r7   c                    	 t        t        t        |j                  d                  }t	        |      dk(  r | | S t        d      # t
        t        f$ r t        d      dw xY w)z
        Parse a string to produce a :class:`.Date`.

        Accepted formats:
            'Y-M-D'

        :param s: the string to be parsed.

        :raises ValueError: if the string could not be parsed.
        r   rQ   (Date string must be in format YYYY-MM-DDN)listr   rT   splitlenrR   AttributeError)r_   rr   numberss      r5   parsez
Date.parse  sn    		I3sAGGCL12G 7|q G}$GHH N+ 	:	s   (A A$c                    t         j                  |      }|rXt        |j                  d            }t        |j                  d            }t        |j                  d            } | |||      S t	        d      )z
        Parse a ISO formatted Date string.

        Accepted formats:
            'YYYY-MM-DD'

        :param s: the string to be parsed.

        :raises ValueError: if the string could not be parsed.
        r   r   rQ   rF  )r&   r   rT   r   rR   )r_   rr   mr4   rE   rU   s         r5   r   zDate.from_iso_format  se     ##A&qwwqz?D
OEaggaj/CtUC((CDDr7   c                H    t         j                  |j                               S )zt
        Convert from a native Python :class:`datetime.date` value.

        :param d: the date to convert.
        )r   rD  	toordinal)r_   r   s     r5   r6  zDate.from_native  s       //r7   fClockTime is an implementation detail. It and its related methods will be removed in a future version.c                &    | j                  ||      S )a  
        Convert from a ClockTime relative to a given epoch.

        :param clock_time: the clock time as :class:`.ClockTime` or as tuple of
            (seconds, nanoseconds)
        :param epoch: the epoch to which ``clock_time`` is relative

        .. deprecated:: 6.0
            :class:`ClockTime` is an implementation detail.
            It and its related methods will be removed in a future version.
        r(  r_   
clock_timeepochs      r5   from_clock_timezDate.from_clock_time  s    * ##J66r7   c                    	 t        | }|j                  dz  }t        j                  ||j	                         j                         z         S # t        t        f$ r t        d      d w xY wNr,   z'Clock time must be a 2-tuple of (s, ns))rf   r`   r   rD  r   
to_ordinal	TypeErrorrR   )r_   rU  rV  r  s       r5   r(  zDate._from_clock_time  sr    	J#Z0J !((E1G$$Wuzz|/F/F/H%HII :& 	9	s   A A)c                l    |t         k  s	|t        kD  rt        dt          dt         d      t        |   S )z
        Indicate whether ``year`` is a leap year.

        :param year: the year to look up

        :raises ValueError: if ``year`` is out of range:
            :attr:`MIN_YEAR` <= year <= :attr:`MAX_YEAR`
        rI   rJ   rK   )r   r   rR   r:   r_   r4   s     r5   is_leap_yearzDate.is_leap_year+  7     (?dXo28*BxjJKKT""r7   c                l    |t         k  s	|t        kD  rt        dt          dt         d      t        |   S )z
        Return the number of days in ``year``.

        :param year: the year to look up

        :raises ValueError: if ``year`` is out of range:
            :attr:`MIN_YEAR` <= year <= :attr:`MAX_YEAR`
        rI   rJ   rK   )r   r   rR   _DAYS_IN_YEARr]  s     r5   days_in_yearzDate.days_in_year9  r_  r7   c                    |t         k  s	|t        kD  rt        dt          dt         d      |dk  s|dkD  rt        d      t        ||f   S )a7  
        Return the number of days in ``month`` of ``year``.

        :param year: the year to look up
        :param month: the month to look up

        :raises ValueError: if ``year`` or ``month`` is out of range:
            :attr:`MIN_YEAR` <= year <= :attr:`MAX_YEAR`;
            1 <= year <= 12
        rI   rJ   rK   r   rL   rM   )r   r   rR   rS   )r_   r4   rE   s      r5   rV   zDate.days_in_monthG  sT     (?dXo28*BxjJKK19
9::dEk**r7   c                    |dk  r!| j                  ||      t        |      z   dz   }t        |||      j                         S )Nr   r   )rV   rT   _daterP  )r_   r4   rE   rU   s       r5   __calc_ordinalzDate.__calc_ordinalY  sC    7##D%03s8;a?C T5#&0022r7   c                     y r[   r2   r_   rr   s     r5   r  zDate.fromisoformate      03r7   c                     y r[   r2   r_   r  s     r5   rC  zDate.fromordinalh      47r7   c                     y r[   r2   r9  s      r5   r8  zDate.fromtimestampk  s     r7   c                     y r[   r2   r>  s     r5   utcfromtimestampzDate.utcfromtimestampp  s    =@r7   z_t.Final[Date]r   r   r   
resolutionr   c                    | j                   S )z;
        The year of the date.

        :type: int
        )r"  rw   s    r5   r4   z	Date.year  s     {{r7   c                    | j                   S )z<
        The month of the date.

        :type: int
        )r#  rw   s    r5   rE   z
Date.month  s     ||r7   c                    | j                   dk(  ry| j                   dk\  r| j                   S | j                  | j                  | j                        | j                   z   dz   S )z:
        The day of the date.

        :type: int
        r   r   )r$  rV   r"  r#  rw   s    r5   rU   zDate.day  sP     ::?::?::!!$++t||<tzzIAMMr7   c                H    | j                   | j                  | j                  fS )z23-tuple of (year, month, day) describing the date.)r4   rE   rU   rw   s    r5   year_month_dayzDate.year_month_day  s     yy$**dhh..r7   c                   | j                   }| j                  }d fd}|t        |dd      j                         k\  r- ||dz         }||j                         k  r	 ||      }n.|dz  }n( ||      }||j                         k  r|dz  } ||      }|t	        ||j                         z
  dz  dz          |      fS )z
        3-tuple of (year, week_of_year, day_of_week) describing the date.

        ``day_of_week`` will be 1 for Monday and 7 for Sunday.
        c                    | dz
  dz  dz   S )Nr   r   r2   )os    r5   day_of_weekz'Date.year_week_day.<locals>.day_of_week  s    UaK1$$r7   c                j    t        | dd      }|t        d |j                               z
        z   S )Nr   r0   rh   )r   r   rZ  )yj4ry  s     r5   
iso_week_1z&Date.year_week_day.<locals>.iso_week_1  s0    aABq;r}}+G'GIIIr7   rL   rB   r   r   )r!  r"  r   rZ  rT   )rk   r  r4   r~  week1ry  s        @r5   year_week_dayzDate.year_week_day  s     ..{{	%	J d4R(3355tax(E))++"4(	t$E))++	"4(5++--2Q67 
 	
r7   c                    | j                   | j                         t        | j                   dd      j                         z
  dz   fS )z
        2-tuple of (year, day_of_the_year) describing the date.

        This is the number of the day relative to the start of the year,
        with ``1 Jan`` corresponding to ``1``.
        r   )r"  rP  r   rw   s    r5   year_dayzDate.year_day  s?     KKNNtDKKA6@@BBQF
 	
r7   c                4    t        | j                               S r[   )hashrP  rw   s    r5   __hash__zDate.__hash__  s    DNN$%%r7   c                |    t        |t        t        f      st        S | j	                         |j	                         k(  S )z@``==`` comparison with :class:`.Date` or :class:`datetime.date`.rd   r   re  ri   rP  rj   s     r5   __eq__zDate.__eq__  /    %$/!!~~5??#444r7   c                |    t        |t        t        f      st        S | j	                         |j	                         k  S )z?``<`` comparison with :class:`.Date` or :class:`datetime.date`.r  rj   s     r5   __lt__zDate.__lt__  /    %$/!!~~%//"333r7   c                |    t        |t        t        f      st        S | j	                         |j	                         k  S )z@``<=`` comparison with :class:`.Date` or :class:`datetime.date`.r  rj   s     r5   __le__zDate.__le__  r  r7   c                |    t        |t        t        f      st        S | j	                         |j	                         k\  S )z@``>=`` comparison with :class:`.Date` or :class:`datetime.date`.r  rj   s     r5   __ge__zDate.__ge__  r  r7   c                |    t        |t        t        f      st        S | j	                         |j	                         kD  S )z?``>`` comparison with :class:`.Date` or :class:`datetime.date`.r  rj   s     r5   __gt__zDate.__gt__  r  r7   c                   d }d }t        |t              r|j                  s|j                  rt	        d      |j
                  |j                  cxk(  rdk(  r| S  | j                         }|j                  r |||j                         |j
                  r |||j
                         | j                  |j                  |j                  |j                        |_        |S t        S )zt
        Add a :class:`.Duration`.

        :raises ValueError: if the added duration has a time component.
        c                    t        || j                  z   dz
  d      \  }}| xj                  |z  c_        |dz   | _        y )Nr   rL   )r\   r#  r"  )r   rg   overflow_yearsrE   s       r5   
add_monthsz Date.__add__.<locals>.add_months  s:    $*6AII+=+A2$F!NEHH&H	AIr7   c                v   d| j                   cxk  rdk  sn d| j                   cxk  rdk  sJ  J | j                   dk\  r#| j                   |z   }d|cxk  rdk  r	|| _         y  t        j                  | j                  |z         }|j                  |j
                  |j                   c| _        | _        | _         y )Nr   rC   irN      )r$  r   rD  r!  r"  r#  )r   rh   new_daysd0s       r5   add_dayszDate.__add__.<locals>.add_days
  s    %2%)=2)===)===ww!|77T>&B&&AG ' ""1;;#56B+-99bjj"(((AHair7   z;Cannot add a Duration with seconds or nanoseconds to a Dater   )rd   r   r`   ra   rR   rg   rh   r*  r  r4   rE   rU   r!  ri   )rk   rl   r  r  new_dates        r5   rm   zDate.__add__  s    	"
	K eX&}} 1 1   ||uzz.Q. /||~H zz5::.||8U\\2!%!4!4x~~x||"H Or7   c                     y r[   r2   rj   s     r5   ro   zDate.__sub__)      8;r7   c                     y r[   r2   rj   s     r5   ro   zDate.__sub__,  ri  r7   c                    t        |t        t        f      r+t        | j	                         |j	                         z
        S 	 | j                  |       S # t        $ r	 t        cY S w xY w)a  
        Subtract a :class:`.Date` or :class:`.Duration`.

        :returns: If a :class:`.Date` is subtracted, the time between the two
            dates is returned as :class:`.Duration`. If a :class:`.Duration` is
            subtracted, a new :class:`.Date` is returned.
        :rtype: Date or Duration

        :raises ValueError: if the added duration has a time component.
        r{  )rd   r   re  r   rP  rm   r[  ri   rj   s     r5   ro   zDate.__sub__/  s[     edE]+$.."2U__5F"FHH	"<<'' 	"!!	"s   A A'&A'c                X    | t         u ryt        |       j                  | j                  ffS )Nr%   )r%   r   r   r   rw   s    r5   r   zDate.__reduce__A  s)    8Dz""T]]$444r7   c                j    t         j                  |       }|r|j                  j                  |       |S r[   r   r^   r   r   r_   r   r   s      r5   r   zDate._restoreF  ,    >>#&$$U+r7   c                     y r[   r2   )rk   r4   rE   rU   kwargss        r5   r*  zDate.replaceQ  s     r7   c           
         t        t        |j                  d| j                              t        |j                  d| j                              t        |j                  d| j
                                    S )a  
            Return a :class:`.Date` with one or more components replaced.

            :Keyword Arguments:
               * **year** (:class:`typing.SupportsIndex`):
                 overwrite the year - default: ``self.year``
               * **month** (:class:`typing.SupportsIndex`):
                 overwrite the month - default: ``self.month``
               * **day** (:class:`typing.SupportsIndex`):
                 overwrite the day - default: ``self.day``
            r4   rE   rU   )r   rT   getr"  r#  r$  rk   r  s     r5   r*  zDate.replace[  sV     FJJvt{{34FJJw56FJJudjj12 r7   c                    | j                   \  }}}| j                  \  }}t        | j                  | j                  | j
                  ddd|dz
  |df	      S )z.Convert the date to :class:`time.struct_time`.r   r   rN   )r  r  _struct_timer4   rE   rU   )rk   _ry  day_of_years       r5   
time_tuplezDate.time_tuplem  s^     ..1k;		

a

 	
r7   c                    | j                   S )z
        Get the date's proleptic Gregorian ordinal.

        The corresponding class method for the reverse ordinal-to-date
        transformation is :meth:`.Date.from_ordinal`.
        )r!  rw   s    r5   rZ  zDate.to_ordinal  s     ~~r7   c                $    | j                  |      S )ak  
        Convert the date to :class:`ClockTime` relative to ``epoch``'s date.

        :param epoch: the epoch to which the date is relative

        :returns: the :class:`ClockTime` value.

        .. deprecated:: 6.0
            :class:`ClockTime` is an implementation detail.
            It and its related methods will be removed in a future version.
        _to_clock_timerk   rV  s     r5   to_clock_timezDate.to_clock_time  s      ""5))r7   c                    	 t        d| j                         |j                         z
  z        S # t        $ r t        d      d w xY w)Nr,   zEpoch has no ordinal value)rf   rZ  rJ  r[  r  s     r5   r  zDate._to_clock_time  sL    	Det'85;K;K;M'MNOO 	D89tC	Ds	   ,/ Ac                H    t        j                  | j                               S )z8Convert to a native Python :class:`datetime.date` value.)re  rC  rZ  rw   s    r5   	to_nativezDate.to_native  s      !233r7   c                &    | j                   d   dz
  S )z:Get the day of the week where Monday is 0 and Sunday is 6.r   r   r  rw   s    r5   weekdayzDate.weekday  s    !!!$q((r7   c                     | j                   d   S )z:Get the day of the week where Monday is 1 and Sunday is 7.r   r  rw   s    r5   iso_weekdayzDate.iso_weekday  s    !!!$$r7   c                    | j                   S )zReturn :attr:`.year_week_day`.r  rw   s    r5   iso_calendarzDate.iso_calendar  s    !!!r7   c                \    | j                   dk(  ry| j                  \  }}}|dd|dd|dS )z2Return the :class:`.Date` as ISO formatted string.r   z
0000-00-0004dr   02dr!  ru  rk   r4   rE   rU   s       r5   r   zDate.iso_format  s@    >>Q..eSs1U3KqS	22r7   c                Z    | j                   dk(  ry| j                  \  }}}d|d|d|dS )Nr   zneo4j.time.ZeroDatezneo4j.time.Date(, rK   r  r  s       r5   rt   zDate.__repr__  s>    >>Q(..eS!$E9BsgQ??r7   c                "    | j                         S r[   r   rw   s    r5   r   zDate.__str__  r   r7   c                    |s| j                         S t        j                  d|      }| j                         j	                  |      S )N	000000000)r   r.   subr  
__format__rk   format_specs     r5   r  zDate.__format__  s<    ??$$'++KE~~**;77r7   c                    	 | j                   | j                  | j                  | j                  | j                  | j
                  d|   S # t        $ r t        d|      dw xY w)
        Get attribute by name.

        Map standard library attribute names to local attribute names,
        for compatibility.
        )isocalendar	isoformat
isoweekdaystrftimerP  	timetupleDate has no attribute N)r  r   r  r  rZ  r  KeyErrorrJ  rk   names     r5   __getattr__zDate.__getattr__  sr    
	N#00!__".. OO!__!__    	N #9$!BCM	Ns   AA
 
A#c                     y r[   r2   rw   s    r5   r  zDate.iso_calendar  s    r7   )r4   rT   rE   rT   rU   rT   rz   r   )
r  rT   r4   rT   rE   rT   rU   rT   rz   r   r[   )r/  _tzinfo | Nonerz   r   rz   r   )r:  re   r/  r  rz   r   )r:  re   rz   r   )r  rT   rz   r   )rr   r   rz   r   )r   re  rz   r   )rU  ClockTime | tuple[float, int]rV  r   rz   r   )r4   rT   rz   r   )r4   rT   rz   rT   )r4   rT   rE   rT   rz   rT   r  r  rz   tuple[int, int]rl   r   rz   r   )rl   Date | _daterz   r   )rl   r   rz   r   )rl   r  rz   r   )...)
r4   _t.SupportsIndexrE   r  rU   r  r  r   rz   r   )rz   r  )rV  zDate | DateTimerz   rY   )rz   re  r  )Ir{   r|   r}   r~   r^   r   r  r0  r3  r;  r?  rD  rL  r   r6  _deprecatedrW  r(  r^  rb  rV   r  _tTYPE_CHECKINGr  rC  r8  ro  r   r  r   rp  r!  r"  r#  r$  r   r4   rE   rU   ru  r  r  r  r  r  r  r  r  rm   overloadro   r   r   r*  r  rZ  r  r  r  r  r  r  r   rt   r   r  r  r  r  r  rP  r  r2   r7   r5   r   r   M  s   "L4    ( D D 48GG#1G	G G ? ? 4 4* I I, E E& 0 0 	J717 7 
	7	 
7$ J1J J 
	J J # # # # + +" 3 3 
	3 
3	7 
7	8<	!	'5		 
	 
@ 
@ C+C)%)J")+ IFGE    
N 
N / / 
 
B 

 

&54554)V [[; ;[[3 3"$5
   
 &)&)$'		"	 $	 "		
 	 		$
$ 	J*	*D4)%"3@!8N& 
;	 
		 r7   r   )	metaclassrB  r{  c                Z   | y 	 | j                  |      }|y t        |t              rH|j
                  dk7  rt        d      |j                  dz  dk7  s|j                  dk7  rt        d      |S t        d      # t        $ r% | | j                  |j                               }Y w xY w)Nr   zdst must be less than a dayr  z%dst must be a whole number of minuteszdst must be a timedelta)	dstr[  r  rd   r   rh   rR   r`   r   )r/  dtvalues      r5   _dstr    s     
z'r
 }%$::?:;;==2"e&8&8A&=DEE
-
..  ': r||~&'s   A< <+B*)B*c                    | y 	 | j                  |      S # t        $ r% | | j                  |j                               cY S w xY wr[   )tznamer[  r  )r/  r  s     r5   _tz_namer    sK    	z)yy} ): yy(()s    +AAc                     e Zd ZU dZ	 	 	 	 	 d;	 	 	 	 	 	 	 	 	 	 	 d<dZe	 	 	 	 	 	 	 	 	 	 	 	 	 	 d=d       Z	 	 	 	 	 	 	 	 	 	 	 	 	 	 d>dZed?d@d       ZedAd	       Z	edBd
       Z
ed?dCd       ZedDd       Ze ed      	 	 	 	 	 	 dEd              Ze	 	 	 	 	 	 dEd       Zed        Zed        Zed        Zed        Zej*                  redBd       Z
edAd       Z	dZded<   	 dZded<   	 dZded<   	 dZdZdZdZdZdZded<   e dFd       Z!e dFd       Z"e dFd       Z#e dFd       Z$e dFd        Z%e dGd!       Z&e dHd"       Z'ejP                  	 dI	 	 	 	 	 dJd#       Z)ejP                  	 	 	 	 	 	 dKd$       Z)	 dI	 	 	 	 	 dLd%Z)d& Z*dMd'Z+dNd(Z,dNd)Z-dNd*Z.dNd+Z/ej*                  r	 	 	 	 	 dO	 	 	 	 	 	 	 	 	 	 	 	 	 dPd,Z0ndAd-Z0d?d.Z1dQd/Z2dQd0Z3dRd1Z4 ed      dSd2       Z5dSd3Z6dTd4Z7dUd5Z8dUd6Z9dUd7Z:d8 Z;d9 Z<ej*                  rdUd:Z=e2Z>yy)Vr#   a  
    Time of day.

    The :class:`.Time` class is a nanosecond-precision drop-in replacement for
    the standard library :class:`datetime.time` class.

    A high degree of API compatibility with the standard library classes is
    provided.

    :class:`neo4j.time.Time` objects introduce the concept of ``ticks``.
    This is simply a count of the number of nanoseconds since midnight,
    in many ways analogous to the :class:`neo4j.time.Date` ordinal.
    ``ticks`` values are integers, with a minimum value of ``0`` and a maximum
    of ``86_399_999_999_999``.

    Local times are represented by :class:`.Time` with no ``tzinfo``.

    :param hour: the hour of the time. Must be in range 0 <= hour < 24.
    :param minute: the minute of the time. Must be in range 0 <= minute < 60.
    :param second: the second of the time. Must be in range 0 <= second < 60.
    :param nanosecond: the nanosecond of the time.
        Must be in range 0 <= nanosecond < 999999999.
    :param tzinfo: timezone or None to get a local :class:`.Time`.

    :raises ValueError: if one of the parameters is out of range.

    .. versionchanged:: 5.0
        The parameter ``second`` no longer accepts :class:`float` values.
    r   Nr  c                    | j                  ||||      \  }}}}d|z  d|z  z   d|z  z   |z   }| j                  ||||||       y )Nr   r   r)   )_Time__normalize_nanosecond_Time__unchecked_init)rk   hourminutesecond
nanosecondr	   tickss          r5   __init__zTime.__init__>  ss     ,0+F+F&&*,
(ffj D F"#6!"  	 	eT66:vNr7   c                d    t         j                  t              }|j                  ||||||       |S r[   )r   r^   r#   r  )r_   r  r  r   r  nanor/  r   s           r5   __unchecked_newzTime.__unchecked_newQ  s/     >>$'!!%wbIr7   c                X    || _         || _        || _        || _        || _        || _        y r[   )_Time__ticks_Time__hour_Time__minute_Time__second_Time__nanosecond_Time__tzinfo)rk   r  r  r   r  r  r/  s          r5   __unchecked_initzTime.__unchecked_init_  s/      r7   c                    |,| j                  t               j                         t              S t        j                         j                  t        j                        j                  |      j                         S )u/  
        Get the current time.

        :param tz: optional timezone

        :raises OverflowError: if the timestamp is out of the range of values
            supported by the platform C localtime() function. It’s common for
            this to be restricted to years from 1970 through 2038.
        r'  )r(  r   r   r$   r   r)  r*  r+  r,  r-  timetzr.  s     r5   nowzTime.nowq  sZ     :''(;(;(=yII   "	.B	r7   c                Z    | j                  t               j                         t              S )z'Get the current time as UTC local time.r2  r   s    r5   r)  zTime.utc_now  r4  r7   c                x   ddl m} t        j                  |      }|rt	        |j                  d            }t	        |j                  d      xs d      }t	        |j                  d      xs d      }|j                  d      }|rt	        |dd j                  dd	            }nd}|j                  d
       | ||||      S |j                  d      dk(  rdnd}t	        |j                  d            }	t	        |j                  d            }
d|	z  |
z   } |||z        } | |||||      S t        d      )a  
        Parse a ISO formatted time string.

        Accepted formats:
            Local times:
                'hh'
                'hh:mm'
                'hh:mm:ss'
                'hh:mm:ss.ssss...'
            Times with timezones (UTC offset):
                '<local time>+hh:mm'
                '<local time>+hh:mm:ss'
                '<local time>+hh:mm:ss.ssss....'
                '<local time>-hh:mm'
                '<local time>-hh:mm:ss'
                '<local time>-hh:mm:ss.ssss....'

                Where the UTC offset will only respect hours and minutes.
                Seconds and sub-seconds are ignored.

        :param s: String to parse

        :raises ValueError: if the string does not match the required format.
        r   )FixedOffsetr   rQ   r=   r   r   r>   r      +rN   r?   r  r'  z Time string is not in ISO format)pytzr
  r'   r   rT   r   r   rR   )r_   rr   r
  rN  r  r  r  r  offset_multiplieroffset_houroffset_minuteoffsetr/  s                r5   r   zTime.from_iso_format  s$   4 	%##A&qwwqz?Dq)Fq)FJ Ab!1!7!73!?@

wwqz!4<<)*s):A!!!''"+. #AGGBK 0 k)M9 !2V!;<4BGG;<<r7   c                   t        |t              st        d      d|cxk  rdk  rTn t        d      t        |t              \  }}t        |d      \  }}t        |d      \  }}| j                  ||||||      S t        d      )a  
        Create a time from ticks (nanoseconds since midnight).

        :param ticks: nanoseconds since midnight
        :param tz: optional timezone

        :raises ValueError: if ticks is out of bounds
            (0 <= ticks < 86400000000000)

        .. versionchanged:: 5.0
            The parameter ``ticks`` no longer accepts :class:`float` values
            but only :class:`int`. It's now nanoseconds since midnight instead
            of seconds.
        zTicks must be intr   l     "R: r  z&Ticks out of range (0..86400000000000))rd   rT   r[  r\   r*   _Time__unchecked_newrR   )r_   r  r/  r  r  r  r  s          r5   
from_tickszTime.from_ticks  s      %%/00&& ABB "(}!=FJ#FB/NFF!&"-LD&&&tVVZ  ABBr7   c                    |j                   dz  }t        |j                  |j                  |j                  ||j
                        S )zt
        Convert from a native Python :class:`datetime.time` value.

        :param t: time to convert from
        r   )microsecondr#   r  r  r  r	   )r_   tr  s      r5   r6  zTime.from_native  s5     ]]T)
AFFAHHahh
AHHEEr7   rQ  c                &    | j                  ||      S )a  
        Convert from a :class:`.ClockTime` relative to a given epoch.

        This method, in contrast to most others of this package, assumes days
        of exactly 24 hours.

        :param clock_time: the clock time as :class:`.ClockTime` or as tuple of
            (seconds, nanoseconds)
        :param epoch: the epoch to which ``clock_time`` is relative

        .. deprecated:: 6.0
            :class:`ClockTime` is an implementation detail.
            It and its related methods will be removed in a future version.
        rS  rT  s      r5   rW  zTime.from_clock_time  s    0 ##J66r7   c                    t        | }|j                  dz  }t        t        |z  |j                  z         }|j                         j                  |z   dt        z  z  }t        j                  |      S )Nr,   )	rf   r`   rT   r*   ra   r   r  r#   r  )r_   rU  rV  tsra   r  s         r5   r(  zTime._from_clock_time  sg      ,
%'-",z/E/EEF##k1em6KLu%%r7   c                `    t        |      }d|cxk  rdk  r|S  t        d      t        d      )Nr      zHour out of range (0..23))rT   rR   )r_   r  s     r5   __normalize_hourzTime.__normalize_hour  s7    4y>r>K 455j455r7   c                    | j                  |      }t        |      }d|cxk  rdk  r||fS  t        d      t        d      )Nr   r  zMinute out of range (0..59))_Time__normalize_hourrT   rR   )r_   r  r  s      r5   __normalize_minutezTime.__normalize_minute  sN    ##D)V< 677j677r7   c                    | j                  ||      \  }}t        |      }d|cxk  rdk  rn t        d      |||fS t        d      )Nr   r  zSecond out of range (0..59))_Time__normalize_minuterT   rR   )r_   r  r  r  s       r5   __normalize_secondzTime.__normalize_second  sU    --dF;fV677 ''677r7   c                    | j                  |||      \  }}}d|cxk  r	t        k  r	n n||||fS t        dt        dz
   d      )Nr   zNanosecond out of range (0..r   rK   )_Time__normalize_secondr*   rR   )r_   r  r  r  r  s        r5   __normalize_nanosecondzTime.__normalize_nanosecond"  sT    "55dFFKff
*]*3378I7J!LMMr7   c                     y r[   r2   rh  s     r5   r   zTime.from_iso_format-  s    25r7   c                     y r[   r2   r   s    r5   r)  zTime.utc_now0  s    "%r7   _t.Final[Time]r   r   r   rp  r  c                    | j                   S )z
        The total number of nanoseconds since midnight.

        .. versionchanged:: 5.0
            The property's type changed from :class:`float` to :class:`int`.
            It's now nanoseconds since midnight instead of seconds.
        )r  rw   s    r5   r  z
Time.ticksL  s     ||r7   c                    | j                   S )zThe hours of the time.)r  rw   s    r5   r  z	Time.hourW  s     {{r7   c                    | j                   S )zThe minutes of the time.)r   rw   s    r5   r  zTime.minute\       }}r7   c                    | j                   S )a  
        The seconds of the time.

        .. versionchanged:: 4.4
            The property's type changed from :class:`float` to
            :class:`decimal.Decimal` to mitigate rounding issues.

        .. versionchanged:: 5.0
            The  property's type changed from :class:`decimal.Decimal` to
            :class:`int`. It does not longer cary sub-second information.
            Use :attr:`nanosecond` instead.
        )r  rw   s    r5   r  zTime.seconda  s     }}r7   c                    | j                   S )zThe nanoseconds of the time.)r  rw   s    r5   r  zTime.nanosecondq  s        r7   c                ^    | j                   | j                  | j                  | j                  fS )z:The time as a tuple of (hour, minute, second, nanosecond).)r  r   r  r  rw   s    r5   hour_minute_second_nanosecondz"Time.hour_minute_second_nanosecondv  s%     {{DMM4==$:K:KKKr7   c                    | j                   S )zThe timezone of this time.)r  rw   s    r5   r	   zTime.tzinfo{  r-  r7   c                     y r[   r2   rk   rl   stricts      r5   _get_both_normalized_tickszTime._get_both_normalized_ticks  s     r7   c                     y r[   r2   r4  s      r5   r6  zTime._get_both_normalized_ticks  s     "%r7   c                R   | j                         d u |j                         d u z  r|rt        d      y t        |t              r|j
                  }n^t        |t              sJ t        d|j                  z  d|j                  z  z   t        |j                  z  z   d|j                  z  z         }|j                         }|#|t        |j                         t        z        z  }| j
                  }| j                         }|#|t        |j                         t        z        z  }||fS )Nz1can't compare offset-naive and offset-aware timesr   r   r   )
utc_offset	utcoffsetr[  rd   r#   r  _timerT   r  r  r*   r  r  total_seconds)rk   rl   r5  other_ticksr9  
self_tickss         r5   r6  zTime._get_both_normalized_ticks  s     OO%%//*;t*CDG  eT"--KeU+++

*,-%,,./ ***+K ).(9
!3z779MIJJK\\
__&
!#j668=HIIJ;&&r7   c                    | j                   dz  dk(  rt        | j                               S | j                  }| j	                         (|| j	                         j                         t        z  z  }t        |      S Nr   r   )r  r  r  r  r9  r<  r*   )rk   r>  s     r5   r  zTime.__hash__  sg    t#q(())\\
??($//+99;mKKJJr7   c                z    t        |t        t        f      st        S | j	                  |d      }|y|\  }}||k(  S )z>`==` comparison with :class:`.Time` or :class:`datetime.time`.Fr5  rd   r#   r;  ri   r6  )rk   rl   r  r>  r=  s        r5   r  zTime.__eq__  sH    %$/!!//e/D="'
K[((r7   c                l    t        |t        t        f      st        S | j	                  |      \  }}||k  S )z=`<` comparison with :class:`.Time` or :class:`datetime.time`.rC  rk   rl   r>  r=  s       r5   r  zTime.__lt__  6    %$/!!"&"A"A%"H
KK''r7   c                l    t        |t        t        f      st        S | j	                  |      \  }}||k  S )z>`<=` comparison with :class:`.Time` or :class:`datetime.time`.rC  rE  s       r5   r  zTime.__le__  6    %$/!!"&"A"A%"H
K[((r7   c                l    t        |t        t        f      st        S | j	                  |      \  }}||k\  S )z>`>=` comparison with :class:`.Time` or :class:`datetime.time`.rC  rE  s       r5   r  zTime.__ge__  rH  r7   c                l    t        |t        t        f      st        S | j	                  |      \  }}||kD  S )z=`>` comparison with :class:`.Time` or :class:`datetime.time`.rC  rE  s       r5   r  zTime.__gt__  rF  r7   c                     y r[   r2   )rk   r  r  r  r  r	   r  s          r5   r*  zTime.replace  s     r7   c                n   t        t        |j                  d| j                              t        |j                  d| j                              t        |j                  d| j
                              t        |j                  d| j                              |j                  d| j                              S )a  
            Return a :class:`.Time` with one or more components replaced.

            :Keyword Arguments:
               * **hour** (:class:`typing.SupportsIndex`):
                 overwrite the hour - default: ``self.hour``
               * **minute** (:class:`typing.SupportsIndex`):
                 overwrite the minute - default: ``self.minute``
               * **second** (:class:`typing.SupportsIndex`):
                 overwrite the second - default: ``int(self.second)``
               * **nanosecond** (:class:`typing.SupportsIndex`):
                 overwrite the nanosecond - default: ``self.nanosecond``
               * **tzinfo** (:class:`datetime.tzinfo` or :data:`None`):
                 overwrite the timezone - default: ``self.tzinfo``
            r  r  r  r  r	   )r  r  r  r  r	   )r#   rT   r  r  r   r  r  r  r  s     r5   r*  zTime.replace  s      FDKK896::h>?6::h>?vzz,8I8IJKzz(DMM: r7   c                   | j                   y 	 | j                   j                  |      }|y t	        |t
              rV|j                         }d|cxk  rdk  st        d       t        d      |dz  dk7  s|j                  dk7  rt        d      |S t        d      # t        $ r, | j                   j                  |j                               }Y w xY w)Nir,   z!utcoffset must be less than a dayr  r   z+utcoffset must be a whole number of minuteszutcoffset must be a timedelta)	r	   r:  r[  r  rd   r   r<  rR   r   )rk   r  r  rr   s       r5   _utc_offsetzTime._utc_offset   s    ;;	:KK))"-E
 =eZ(##%AQ&& !DEE ' !DEE2v{e00A5 !NOOL788  	: KK))",,.9E	:s   B 2CCc                "    | j                         S )a  
        Return the UTC offset of this time.

        :returns: None if this is a local time (:attr:`.tzinfo` is None), else
            returns ``self.tzinfo.utcoffset(self)``.

        :raises ValueError: if ``self.tzinfo.utcoffset(self)`` is not None and
            a :class:`timedelta` with a magnitude greater equal 1 day or that
            is not a whole number of minutes.
        :raises TypeError: if `self.tzinfo.utcoffset(self)` does return
            anything but :data:`None` or a :class:`datetime.timedelta`.
        )rN  rw   s    r5   r9  zTime.utc_offset  s     !!r7   c                .    t        | j                  d      S )a	  
        Get the daylight saving time adjustment (DST).

        :returns: None if this is a local time (:attr:`.tzinfo` is None), else
            returns ``self.tzinfo.dst(self)``.

        :raises ValueError: if ``self.tzinfo.dst(self)`` is not None and a
            :class:`timedelta` with a magnitude greater equal 1 day or that is
            not a whole number of minutes.
        :raises TypeError: if ``self.tzinfo.dst(self)`` does return anything
            but None or a :class:`datetime.timedelta`.
        Nr  r	   rw   s    r5   r  zTime.dst#  s     DKK&&r7   c                .    t        | j                  d      S )z
        Get the name of the :class:`.Time`'s timezone.

        :returns: None if the time is local (i.e., has no timezone), else
            return ``self.tzinfo.tzname(self)``
        Nr  r	   rw   s    r5   r  zTime.tzname2  s     T**r7   c                "    | j                         S )a!  
        Convert to :class:`.ClockTime`.

        The returned :class:`.ClockTime` is relative to :attr:`Time.min`.

        .. deprecated:: 6.0
            :class:`ClockTime` is an implementation detail.
            It and its related methods will be removed in a future version.
        r  rw   s    r5   r  zTime.to_clock_time<       ""$$r7   c                T    t        | j                  t              \  }}t        ||      S r[   )r\   r  r*   rf   )rk   r`   ra   s      r5   r  zTime._to_clock_timeL  s$    %djj-@';//r7   c                v    | j                   \  }}}}t        |dz        }| j                  }t        |||||      S )z
        Convert to a native Python :class:`datetime.time` value.

        This conversion is lossy as the native time implementation only
        supports a resolution of microseconds instead of nanoseconds.
        r   )r1  r   r	   r;  )rk   hrN  rr   rs      μsr/  s          r5   r  zTime.to_nativeP  sA     881a!"t),[[Q1c2&&r7   c                    | j                   \  }}}}|dd|dd|dd|d}| j                         }|5t        t        |j	                         dz        d      \  }}||dd|dz  }|S )z2Return the :class:`.Time` as ISO formatted string.r  :r   09dr  +03d)r1  r9  r\   rT   r<  )	rk   rX  rN  rr   rs   resr  offset_hoursoffset_minutess	            r5   r   zTime.iso_format\  s    881a3q3q3qC1"+1F((*b012,(L. l4(.)=>>C
r7   c                    | j                   $t        t        t        | j                              }n,g t        t        | j                        d| j                   }ddj                  |       dS )Ntzinfo=zneo4j.time.Time(r  rK   )r	   r]   r   reprr1  r  rk   fieldss     r5   rt   zTime.__repr__h  sm    ;;3tT%G%GHIFT4==>$++)F
 "$))F"3!4A66r7   c                "    | j                         S r[   r   rw   s    r5   r   zTime.__str__t  r   r7   c                    |s| j                         S t        j                  | j                  d|      }| j	                         j                  |      S N09)r   r.   r  r  r  r  r  s     r5   r  zTime.__format__w  sL    ??$$'++  ${
 ~~**;77r7   c                t    	 | j                   | j                  d|   S # t        $ r t        d|      dw xY w)r  )r  r:  r  N)r   r9  r  rJ  r  s     r5   r  zTime.__getattr__  sR    	N!__!__    	N #9$!BCM	Ns    7c                     y r[   r2   rw   s    r5   r  zTime.isoformat      r7   r   r   r   r   N)r  rT   r  rT   r  rT   r  rT   r	   r  rz   None)r  rT   r  rT   r   rT   r  rT   r  rT   r/  r  rz   r#   )r  rT   r  rT   r   rT   r  rT   r  rT   r/  r  rz   rn  r[   )r/  r  rz   r#   rz   r#   )rr   r   rz   r#   )r  rT   r/  r  rz   r#   )r  r;  rz   r#   )rU  r  rV  r   rz   r#   r  r  rz   r  T)rl   Time | _timer5  _t.Literal[True]rz   r  )rl   rr  r5  _t.Literal[False]rz   tuple[int, int] | None)rl   rr  r5  r   rz   ru  r  )rl   rr  rz   r   ).....)r  r  r  r  r  r  r  r  r	   r  r  r   rz   r#   rz   _timedelta | Nonerz   
str | Nonerz   rY   )rz   r;  r  )?r{   r|   r}   r~   r  r   r  r  r  r)  r   r  r6  r  rW  r(  r  r"  r%  r  r  r  r   r  r   rp  r  r  r   r  r  r  r   r  r  r  r  r  r1  r	   r  r6  r  r  r  r  r  r  r*  rN  r9  r  r  r  r  r  r   rt   r   r  r  r  r:  r2   r7   r5   r#   r#     s   D !%OO O 	O
 O O 
O&   	
    
   	
    
$  ( D D 1= 1=f C C4 F F 	J717 7 
	7	 
7* 	&1	& 	& 
		& 	& 6 6 8 8 8 8 N N 
	5 
5	% 
% C+C)%)J")+ GFHHL#Hn#        ! ! L L   [[>B!+;	  [[%!%+<%	% %
 37'!'+/'	'< )())( 
 &)'*'*+.%(	"	 %	 %		
 )	 #	 	 		09("'+ 	J
%	
%0
'

7!8N 
	 	 r7   r#   )r  r  r  r     ;   )ra   r)  r!   rL   )r  r    c                     e Zd ZU dZded<   ded<   	 	 	 	 	 dW	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dXdZedYdZd       Zed[d	       Zed[d
       Z	e	 dY	 	 	 	 	 d\d       Z
ed]d       Zed^d       Ze	 	 	 	 	 	 d_d       Zed_d       Zed        Zed`d       Ze ed      	 	 	 	 	 	 dad              Ze	 	 	 	 	 	 dad       Zej*                  rFed[d       Zed^d       Ze	 dY	 	 	 	 	 d\d       Zed        ZedYdZd       Zed]d       Zed[d       ZdZded<   	 dZded<   	 dZded <   	 e dbd!       Z!e dbd"       Z"e dbd#       Z#e dcd$       Z$e dcd%       Z%e ddd&       Z&e dbd'       Z'e dbd(       Z(e dbd)       Z)e dbd*       Z*e ded+       Z+e dfd,       Z,ejZ                  	 dg	 	 	 	 	 dhd-       Z.ejZ                  	 	 	 	 	 	 did.       Z.	 dg	 	 	 	 	 djd/Z.d0 Z/dkd1Z0	 	 	 	 dld2Z1	 	 	 	 dld3Z2	 	 	 	 dld4Z3	 	 	 	 dkd5Z4dmd6Z5ejZ                  dnd7       Z6ejZ                  dod8       Z6ejZ                  dpd9       Z6d: Z6d; Z7ed<        Z8dqd=Z9drd>Z:drd?Z;ej*                  r!	 	 	 	 	 	 	 	 ds	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dtd@Z<nd[dAZ<dudBZ=dvdCZ>dvdDZ?dwdEZ@dF ZAdG ZBdbdHZC ed      dxdI       ZDdxdJZEdydKZFdbdLZGdbdMZHdcdNZIdzd{dOZJd|dPZKd|dQZLdR ZMdS ZNej*                  r 	 	 	 	 dudTZO	 	 dcdUZPdzd{dVZJeHZQeMZReCZSeAZTe>ZUeBZVyy)}r   a  
    A point in time represented as a date and a time.

    The :class:`.DateTime` class is a nanosecond-precision drop-in replacement
    for the standard library :class:`datetime.datetime` class.

    As such, it contains both :class:`.Date` and :class:`.Time` information and
    draws functionality from those individual classes.

    A :class:`.DateTime` object is fully compatible with the Python time zone
    library `pytz <https://pypi.org/project/pytz/>`_. Functions such as
    ``normalize`` and ``localize`` can be used in the same way as they are with
    the standard library classes.

    Regular construction of a :class:`.DateTime` object requires at
    least the ``year``, ``month`` and ``day`` arguments to be supplied. The
    optional ``hour``, ``minute`` and ``second`` arguments default to zero and
    ``tzinfo`` defaults to :data:`None`.

    ``year``, ``month``, and ``day`` are passed to the constructor of
    :class:`.Date`. ``hour``, ``minute``, ``second``, ``nanosecond``, and
    ``tzinfo`` are passed to the constructor of :class:`.Time`. See their
    documentation for more details.

        >>> dt = DateTime(2018, 4, 30, 12, 34, 56, 789123456); dt
        neo4j.time.DateTime(2018, 4, 30, 12, 34, 56, 789123456)
        >>> dt.second
        56
    r   _DateTime__dater#   _DateTime__timeNc	           
     V    | j                  t        |||      t        |||||            S r[   )combiner   r#   )	r_   r4   rE   rU   r  r  r  r  r	   s	            r5   r^   zDateTime.__new__  s1     {{uc"vvz6:
 	
r7   c                   |,| j                  t               j                         t              S | j                  t               j	                         t              j                  |      }	 |j                  |      S # t        $ rn |j                         }|j                  |      }| j                  |      }|j                  |j                  |j                  z   |j                  dz  z
        cY S w xY w)ub  
        Get the current date and time.

        :param tz: timezone. Set to None to create a local :class:`.DateTime`.

        :raises OverflowError: if the timestamp is out of the range of values
            supported by the platform C localtime() function. It’s common for
            this to be restricted to years from 1970 through 2038.
        r'  r   r  )r(  r   r   r$   r   r*  fromutcr[  r  r6  r  r  )r_   r/  r)  utc_now_native
now_nativer  s         r5   r  zDateTime.now  s     :''(;(;(=yII**!!#YgRg  zz'**  ")!2!2!4ZZ7
ooj1{{!,,-(44t;< #  s   ,A= =A4C43C4c                Z    | j                  t               j                         t              S )z%Get the current date and time in UTC.r2  r   s    r5   r)  zDateTime.utc_now	  r4  r7   c                    	 | j                  t        j                  |dd       t        j                  |dd             S # t        $ r}t	        d      |d}~ww xY w)z
        Parse a ISO formatted date with time string.

        :param s: String to parse

        :raises ValueError: if the string does not match the ISO format.
        r   r   r?   Nz$DateTime string is not in ISO format)r  r   r   r#   rR   )r_   rr   es      r5   r   zDateTime.from_iso_format	  sb    	L;;$$QqW-t/C/CAbcF/K   	LCD!K	Ls   =A   	A	AAc                    |8| j                  t        |      t               j                         z   t              S | j                  |      j                  t        j                        j                  |      S )u  
        :class:`.DateTime` from a time stamp (seconds since unix epoch).

        :param timestamp: the unix timestamp (seconds since unix epoch).
        :param tz: timezone. Set to None to create a local :class:`.DateTime`.

        :raises OverflowError: if the timestamp is out of the range of values
            supported by the platform C localtime() function. It’s common for
            this to be restricted to years from 1970 through 2038.
        r'  )
r(  rf   r   r   r$   r?  r*  r+  r,  r-  r9  s      r5   r;  zDateTime.from_timestamp 	  sd     :''9%(=(=(?? 
 &&y1	.Br7   c                2    | j                  |dft              S )z
        :class:`.DateTime` from a time stamp (seconds since unix epoch).

        Returns the :class:`.DateTime` as local date :class:`.DateTime` in UTC.
        r   r=  r>  s     r5   r?  zDateTime.utc_from_timestamp9	  r@  r7   c                T    | j                  t        j                  |      t              S )z{
        :class:`.DateTime` from an ordinal.

        For more info about ordinals see :meth:`.Date.from_ordinal`.
        )r  r   rD  r!   rk  s     r5   rD  zDateTime.from_ordinalB	  s      {{4,,W5x@@r7   c                n    t        |t              sJ t        |t              sJ | j                  ||      S )z
        Combine a :class:`.Date` and a :class:`.Time` to a :class:`DateTime`.

        :param date: the date
        :param time: the time

        :raises AssertionError: if the parameter types don't match.
        )rd   r   r#   _combine)r_   r   r   s      r5   r  zDateTime.combineK	  s5     $%%%$%%%||D$''r7   c                L    t         j                  |       }||_        ||_        |S r[   )r   r^   r~  r  )r_   r   r   r   s       r5   r  zDateTime._combine[	  s#    >>#&r7   c                    t         r[   r   r_   date_stringformats      r5   rL  zDateTime.parseb	  s    !!r7   c                    | j                  t        j                  |j                               t        j                  |j                                     S )z|
        Convert from a native Python :class:`datetime.datetime` value.

        :param dt: the datetime to convert
        )r  r   r6  r   r#   r  )r_   r  s     r5   r6  zDateTime.from_nativef	  s<     {{RWWY')9)9"))+)F
 	
r7   rQ  c                &    | j                  ||      S )a  
        Convert from a :class:`ClockTime` relative to a given epoch.

        :param clock_time: the clock time as :class:`.ClockTime` or as tuple of
            (seconds, nanoseconds)
        :param epoch: the epoch to which ``clock_time`` is relative

        :raises ValueError: if ``clock_time`` is invalid.

        .. deprecated:: 6.0
            :class:`ClockTime` is an implementation detail.
            It and its related methods will be removed in a future version.
        rS  rT  s      r5   rW  zDateTime.from_clock_timer	  s    . ##J66r7   c                   	 t        | \  }}t        |d      \  }}|j                         j                  |t        z  z   |z   }t        |dt        z        \  }}||z  }t
        j                  ||j                         j                         z         }t        j                  |      }	| j                  ||	      S # t        t        f$ r}
t        d      |
d }
~
ww xY wrY  )rf   r\   r   r  r*   r   rD  r   rZ  r#   r  r  r[  rR   )r_   rU  rV  r`   ra   r  r  rh   date_time_r  s              r5   r(  zDateTime._from_clock_time	  s    	-#-z#: G[  &gu5GWJJL&&=)@@;NE (=>KD%tOG%%g

0G0G0I&IJEOOE*E;;ue,, :& 	OFGQN	Os   B9 9CCCc                     y r[   r2   rh  s     r5   r  zDateTime.fromisoformat	  s    /2r7   c                     y r[   r2   rk  s     r5   rC  zDateTime.fromordinal	  r  r7   c                     y r[   r2   r9  s      r5   r8  zDateTime.fromtimestamp	  s     r7   c                     y r[   r2   r  s      r5   strptimezDateTime.strptime	  ri  r7   c                     y r[   r2   r.  s     r5   r0  zDateTime.today	  s    ?Br7   c                     y r[   r2   r>  s     r5   ro  zDateTime.utcfromtimestamp	      ADr7   c                     y r[   r2   r   s    r5   utcnowzDateTime.utcnow	  s    %(r7   z_t.Final[DateTime]r   r   r   rp  c                .    | j                   j                  S zV
        The year of the :class:`.DateTime`.

        See :attr:`.Date.year`.
        )r~  r4   rw   s    r5   r4   zDateTime.year	       {{r7   c                .    | j                   j                  S r  )r~  rE   rw   s    r5   rE   zDateTime.month	  s     {{   r7   c                .    | j                   j                  S )z[
        The day of the :class:`.DateTime`'s date.

        See :attr:`.Date.day`.
        )r~  rU   rw   s    r5   rU   zDateTime.day	  s     {{r7   c                .    | j                   j                  S )zq
        The year_month_day of the :class:`.DateTime`'s date.

        See :attr:`.Date.year_month_day`.
        )r~  ru  rw   s    r5   ru  zDateTime.year_month_day	  s     {{)))r7   c                .    | j                   j                  S )zo
        The year_week_day of the :class:`.DateTime`'s date.

        See :attr:`.Date.year_week_day`.
        )r~  r  rw   s    r5   r  zDateTime.year_week_day	  s     {{(((r7   c                .    | j                   j                  S )ze
        The year_day of the :class:`.DateTime`'s date.

        See :attr:`.Date.year_day`.
        )r~  r  rw   s    r5   r  zDateTime.year_day	  s     {{###r7   c                .    | j                   j                  S )z]
        The hour of the :class:`.DateTime`'s time.

        See :attr:`.Time.hour`.
        )r  r  rw   s    r5   r  zDateTime.hour	  r  r7   c                .    | j                   j                  S )za
        The minute of the :class:`.DateTime`'s time.

        See :attr:`.Time.minute`.
        )r  r  rw   s    r5   r  zDateTime.minute
       {{!!!r7   c                .    | j                   j                  S )za
        The second of the :class:`.DateTime`'s time.

        See :attr:`.Time.second`.
        )r  r  rw   s    r5   r  zDateTime.second
  r  r7   c                .    | j                   j                  S )zi
        The nanosecond of the :class:`.DateTime`'s time.

        See :attr:`.Time.nanosecond`.
        )r  r  rw   s    r5   r  zDateTime.nanosecond
  s     {{%%%r7   c                .    | j                   j                  S )za
        The tzinfo of the :class:`.DateTime`'s time.

        See :attr:`.Time.tzinfo`.
        )r  r	   rw   s    r5   r	   zDateTime.tzinfo"
  r  r7   c                .    | j                   j                  S )z
        The hour_minute_second_nanosecond of the :class:`.DateTime`'s time.

        See :attr:`.Time.hour_minute_second_nanosecond`.
        )r  r1  rw   s    r5   r1  z&DateTime.hour_minute_second_nanosecond+
  s     {{888r7   c                     y r[   r2   r4  s      r5   _get_both_normalizedzDateTime._get_both_normalized6
  s     14r7   c                     y r[   r2   r4  s      r5   r  zDateTime._get_both_normalized;
  s     8;r7   c                   | j                         d u |j                         d u z  r|rt        d      y | }| j                         }|||z  }|j                  d       }|}|j                         }|||z  }|j                  d       }||fS )Nz5can't compare offset-naive and offset-aware datetimesr'  )r9  r:  r[  r*  )rk   rl   r5  	self_normr9  
other_norms         r5   r  zDateTime._get_both_normalized@
  s     OO%%//*;t*CDK  	__&
!#I%%T%2	
__&
!*$J''t'4
*$$r7   c                    | j                   dz  dk(  rt        | j                               S | }| j                         }|||z  }t        |j	                               t        |j                               z  S r@  )r  r  r  r9  r   r   )rk   r  r9  s      r5   r  zDateTime.__hash__V
  si    ??T!Q&())	__&
!#IINN$%Y^^-=(>>>r7   c                D   t        |t        t        f      st        S | j	                         |j                         k(  rD| j                         |j                         k(  xr! | j                         |j                         k(  S | j                  |d      }|y|\  }}||k(  S )z~
        ``==`` comparison with another datetime.

        Accepts :class:`.DateTime` and :class:`datetime.datetime`.
        FrB  	rd   r7  r   ri   r9  r:  r   r   r  )rk   rl   
normalizedr  r  s        r5   r  zDateTime.__eq___
  s     %)X!67!!?? 1199;%**,.N499;%**,3NN..uU.C
 *	:J&&r7   c                   t        |t        t        f      st        S | j	                         |j                         k(  rc| j                         |j                         k(  r!| j                         |j                         k  S | j                         |j                         k  S | j                  |      \  }}|j                         |j                         k  xs! |j                         |j                         k  S )z}
        ``<`` comparison with another datetime.

        Accepts :class:`.DateTime` and :class:`datetime.datetime`.
        r  rk   rl   r  r  s       r5   r  zDateTime.__lt__o
       %)X!67!!?? 11yy{ejjl*yy{UZZ\1199;-- $ 9 9% @	:NNz00 4~~*//"33	
r7   c                t   t        |t        t        f      st        S | j	                         |j                         k(  rc| j                         |j                         k(  r!| j                         |j                         k  S | j                         |j                         k  S | j                  |      \  }}||k  S )z~
        ``<=`` comparison with another datetime.

        Accepts :class:`.DateTime` and :class:`datetime.datetime`.
        r  r  s       r5   r  zDateTime.__le__
       %)X!67!!?? 11yy{ejjl*yy{ejjl2299;%**,.. $ 9 9% @	:J&&r7   c                t   t        |t        t        f      st        S | j	                         |j                         k(  rc| j                         |j                         k(  r!| j                         |j                         k\  S | j                         |j                         k\  S | j                  |      \  }}||k\  S )z~
        ``>=`` comparison with another datetime.

        Accepts :class:`.DateTime` and :class:`datetime.datetime`.
        r  r  s       r5   r  zDateTime.__ge__
  r  r7   c                   t        |t        t        f      st        S | j	                         |j                         k(  rc| j                         |j                         k(  r!| j                         |j                         kD  S | j                         |j                         kD  S | j                  |      \  }}|j                         |j                         kD  xs! |j                         |j                         kD  S )z}
        ``>`` comparison with another datetime.

        Accepts :class:`.DateTime` and :class:`datetime.datetime`.
        r  r  s       r5   r  zDateTime.__gt__
  r  r7   c                   t        |t              r|dk(  r| S | j                         j                         t	        |j
                  |j                        z   }t        |j
                  d      \  }}| j                         t        |j                  ||j                  z         z   }t        j                  |t        z  |j                  z         }| j                  ||      j                  | j                         S t        |t"              r|j%                         dk(  r| S | j                         t	        d|j                  z  |j
                  z   |j&                  dz        z   }t)        |j
                  d      \  }}t*        j-                  |dz         }t        j                  t/        |t        z  |j                  z               }| j                  ||      j                  | j                         S t0        S )z"Add a :class:`datetime.timedelta`.)r   r   r   r   r,   )rg   rh   r'  r   r   r   )rd   r   r   r  rf   r`   ra   r\   r   rg   rh   r#   r  r*   r  r*  r	   r   r<  r   r   r   rD  r   ri   )rk   rl   r  rh   r`   r  r  s          r5   rm   zDateTime.__add__
  s   eX&$		**,zu000 A #199e4MD'IIK(||$*;# E OOGm$;amm$KLE<<u-55T[[5IIeZ(""$)##%


"U]]2""T)) A .aii?MD'%%dQh/EOO#Gm$;amm$KLE <<u-55T[[5IIr7   c                     y r[   r2   rj   s     r5   ro   zDateTime.__sub__
  rl  r7   c                     y r[   r2   rj   s     r5   ro   zDateTime.__sub__
  s    7:r7   c                     y r[   r2   rj   s     r5   ro   zDateTime.__sub__
  r  r7   c                   t        |t              rd| j                  dz
  z  | j                  z   }d|j                  dz
  z  |j                  z   }||z
  }| j                  |j                  z
  }| j                         j                         |j                         j                         z
  }t        |||j                  |j                        S t        |t              r| j                         |j                         z
  }| j                         j                         t        d|j                  z  d|j                  z  z   |j                   z   |j"                  dz        z
  }t%        ||j                  |j                  dz        S t        |t              r| j'                  |       S t        |t$              r| j'                  |       S t(        S )a  
        Subtract a datetime/DateTime or a timedelta/Duration.

        Subtracting a :class:`.DateTime` yields the duration between the two
        as a :class:`.Duration`.

        Subtracting a :class:`datetime.datetime` yields the duration between
        the two as a :class:`datetime.timedelta`.

        Subtracting a :class:`datetime.timedelta` or a :class:`.Duration`
        yields the :class:`.DateTime` that's the given duration away.
        rL   r   r   i  r  r   )rh   r`   r   )rd   r   r4   rE   rU   r   r  r   r`   ra   r7  rZ  rP  rf   r  r  r  r  r   rm   ri   )rk   rl   self_month_ordinalother_month_ordinalrg   rh   r  s          r5   ro   zDateTime.__sub__
  s    eX&!#tyy1}!5

!B"$

Q"7%++"E'*==F88eii'D		**,uzz|/J/J/LLA		MM	  eY'??$u'88D		**,zuzz!B$55D!!D(0 A 		mmt3 
 eX&<<''eZ(<<''r7   c                F    t        |       j                  | j                  ffS r[   )r   r   r   rw   s    r5   r   zDateTime.__reduce__	  s    Dz""T]]$444r7   c                j    t         j                  |       }|r|j                  j                  |       |S r[   r  r  s      r5   r   zDateTime._restore  r  r7   c                    | j                   S )zGet the date.)r~  rw   s    r5   r   zDateTime.date      {{r7   c                :    | j                   j                  d      S )z#Get the time without timezone info.Nr'  )r  r*  rw   s    r5   r   zDateTime.time  s    {{""$"//r7   c                    | j                   S )z Get the time with timezone info.)r  rw   s    r5   r  zDateTime.timetz  r  r7   c	                     y r[   r2   )
rk   r4   rE   rU   r  r  r  r  r	   r  s
             r5   r*  zDateTime.replace#  s     r7   c                     | j                   j                  di |} | j                  j                  di |}| j                  ||      S )z
            Return a ``DateTime`` with one or more components replaced.

            See :meth:`.Date.replace` and :meth:`.Time.replace` for available
            arguments.
            r2   )r~  r*  r  r  )rk   r  r  r  s       r5   r*  zDateTime.replace2  sG     (DKK''1&1E'DKK''1&1E<<u--r7   c                   | j                   | S t        j                  t        | j	                               }| |z
  j                  |      }	 |j                  |      S # t        $ rf |j                         }|j                  |      }| j                  |      }|j                  dz  | j                  dz  z   }|j                  |      cY S w xY w)a  
        Convert this :class:`.DateTime` to another timezone.

        :param tz: the new timezone

        :returns: the same object if ``tz`` is :data:``None``.
            Else, a new :class:`.DateTime` that's the same point in time but in
            a different timezone.
        r'  r   r  )r	   r  castr   r:  r*  r  r[  r  r6  r  r  )rk   r/  r  r,  
native_utc
native_resr^  rs   s           r5   as_timezonezDateTime.as_timezone=  s     ;;KT^^%56f}%%R%0		.::c?" 	. JJ/J"":.C''$.41GGB;;";--	.s   A A,CCc                8    | j                   j                  |       S )zW
        Get the date times utc offset.

        See :meth:`.Time.utc_offset`.
        )r  rN  rw   s    r5   r9  zDateTime.utc_offsetV  s     {{&&t,,r7   c                .    t        | j                  |       S )z`
        Get the daylight saving time adjustment (DST).

        See :meth:`.Time.dst`.
        rQ  rw   s    r5   r  zDateTime.dst^  s     DKK&&r7   c                .    t        | j                  |       S )zK
        Get the timezone name.

        See :meth:`.Time.tzname`.
        rS  rw   s    r5   r  zDateTime.tznamef  s     T**r7   c                    t         r[   r   rw   s    r5   r  zDateTime.time_tuplen      !!r7   c                    t         r[   r   rw   s    r5   utc_time_tuplezDateTime.utc_time_tupleq  r  r7   c                6    | j                   j                         S )zi
        Get the ordinal of the :class:`.DateTime`'s date.

        See :meth:`.Date.to_ordinal`
        )r~  rZ  rw   s    r5   rZ  zDateTime.to_ordinalt  s     {{%%''r7   c                "    | j                         S )a%  
        Convert to :class:`.ClockTime`.

        The returned :class:`.ClockTime` is relative to :attr:`DateTime.min`.

        .. deprecated:: 6.0
            :class:`ClockTime` is an implementation detail.
            It and its related methods will be removed in a future version.
        r  rw   s    r5   r  zDateTime.to_clock_time}  rU  r7   c                    d| j                   j                         dz
  z  }t        | j                  j                  t
              \  }}t        ||z   |      S )Nr,   r   )r~  rZ  r\   r  r  r*   rf   )rk   ordinal_secondstime_secondsra   s       r5   r  zDateTime._to_clock_time  sK    4;;#9#9#;a#?@$*4;;+<+<m$L!k/L8+FFr7   c           
         | j                   \  }}}| j                  \  }}}}t        |dz        }| j                  }	t	        ||||||||	      S )z
        Convert to a native Python :class:`datetime.datetime` value.

        This conversion is lossy as the native time implementation only
        supports a resolution of microseconds instead of nanoseconds.
        r   )ru  r1  rT   r	   r7  )
rk   r|  r   r   rX  rN  rr   rs   msr/  s
             r5   r  zDateTime.to_native  sW     &&2q881ad^[[B1aB33r7   c                6    | j                   j                         S )zE
        Get the weekday.

        See :meth:`.Date.weekday`
        )r~  r  rw   s    r5   r  zDateTime.weekday  s     {{""$$r7   c                6    | j                   j                         S )zM
        Get the ISO weekday.

        See :meth:`.Date.iso_weekday`
        )r~  r  rw   s    r5   r  zDateTime.iso_weekday  s     {{&&((r7   c                6    | j                   j                         S )zP
        Get date as ISO tuple.

        See :meth:`.Date.iso_calendar`
        )r~  r  rw   s    r5   r  zDateTime.iso_calendar  s     {{''))r7   c                d   | j                         j                         }| j                         j                         }| | | }| j                         }|j                         }||S | j                         }|5t	        t        |j                         dz        d      \  }}||dd|dz  }|S )aR  
        Return the :class:`.DateTime` as ISO formatted string.

        This method joins ``self.date().iso_format()`` (see
        :meth:`.Date.iso_format`) and ``self.timetz().iso_format()`` (see
        :meth:`.Time.iso_format`) with ``sep`` in between.

        :param sep: the separator between the formatted date and time.
        r  r]  r[  r  )r   r   r  r9  r\   rT   r<  )	rk   r  s_dates_timerr   time_tzr  r_  r`  s	            r5   r   zDateTime.iso_format  s     '')))+hseF8$++-##%H"+1F((*b012,(L. L&as';<<Ar7   c                    g t        t        | j                        t        t        | j                        }| j                  |j                  d| j                         ddj                  |       dS )Nrb  zneo4j.time.DateTime(r  rK   )r   rc  ru  r1  r	   r   r  rd  s     r5   rt   zDateTime.__repr__  so    
t**+
t99:
 ;;"MMGDKK?34%dii&7%8::r7   c                "    | j                         S r[   r   rw   s    r5   r   zDateTime.__str__  r   r7   c                    |s| j                         S t        j                  | j                  j                  d|      }| j                         j                  |      S rh  )r   r.   r  r  r  r  r  r  s     r5   r  zDateTime.__format__  sP    ??$$'++{{%%b)K
 ~~**;77r7   c           
        	 | j                   | j                  | j                  | j                  | j                  | j
                  | j                  | j                  | j                  d	|   S # t        $ r t        d|      dw xY w)r  )	r-  r  r  r  r  rP  r  r:  utctimetuplezDateTime has no attribute N)r  r  r   r  r  rZ  r  r9  r  r  rJ  r  s     r5   r  zDateTime.__getattr__  s    	"..#00!__".. OO!__!__!__ $ 3 3
 
 
  	 ,TH5	s   A(A+ +Bc                     y r[   r2   )rk   r/  s     r5   r-  zDateTime.astimezone  s    r7   c                     y r[   r2   rw   s    r5   r  zDateTime.isocalendar  s    #&r7   c                     y r[   r2   )rk   r  s     r5   r   zDateTime.iso_format	  rl  r7   rm  )r4   rT   rE   rT   rU   rT   r  rT   r  rT   r  rT   r  rT   r	   r  rz   r   r[   )r/  r  rz   r   )rz   r   )r:  re   r/  r  rz   r   )r:  re   rz   r   )r  rT   rz   r   )r   r   r   r#   rz   r   )r  r7  rz   r   )rU  r  rV  r   rz   r   r  r  r  rp  r  rq  )rl   _datetime | DateTimer5  rs  rz   z%tuple[DateTime, DateTime | _datetime])rl   r  r5  rt  rz   ,tuple[DateTime, DateTime | _datetime] | None)rl   r  r5  r   rz   r  r  )rl   r  rz   r   )rl   z_timedelta | Durationrz   r   )rl   r   rz   r   )rl   r7  rz   r   )rl   r  rz   r   r  ro  )........)r4   r  rE   r  rU   r  r  r  r  r  r  r  r  r  r	   r  r  r   rz   r   )r/  _tzinforz   r   rv  rx  rz  )rz   r7  r  r  r  )Wr{   r|   r}   r~   r  r^   r   r  r)  r   r;  r?  rD  r  r  rL  r6  r  rW  r(  r  r  r  rC  r8  r  r0  ro  r  r   r   rp  r   r4   rE   rU   ru  r  r  r  r  r  r  r	   r1  r  r  r  r  r  r  r  r  rm   ro   r   r   r   r   r  r*  r  r9  r  r  r  r  rZ  r  r  r  r  r  r  r   rt   r   r  r  r-  r  r  r  rP  r  r:  r  r2   r7   r5   r   r     sM   < LL !%

 
 	

 
 
 
 
 
 

$  @ D D L L 48#1	 0 ? ? A A ((#(	( (   " " 
 
 	J717 7 
	7	 
7( -1- - 
	- -( 
	2 
2	; 
;	8<	!	'5		 
	
 
3 
3 
B 
B	D 
D	( 
( #C	"0"C	".%)J")+     ! !   * * ) ) $ $     " " " " & & " " 9 9 [[FJ4)43C4	.4 4 [[;);3D;	5; ;
 ;?%)%37%	5%,?' 
)
	
(')'	'"')'	'"

	
(: [[7 7[[: :[[D D(T5  0 
 &)&)$'%('*'*+.%(	"	 $	 "		
 #	 %	 %	 )	 #	 	 			..2-'+""( 	J
%	
%G
4%)*4;!80 
				'!	'	 !
			%% r7   r   i  c                \    | dk(  rt        dd       t        S t        dt         d|        )NrY   rQ  r   )stack_levelzmodule z has no attribute )_deprecation_warnrf   rJ  r{   )r  s    r5   r  r  &  s;    {;	

 
78*,>tfE
FFr7   )NN)r/  r  r  DateTime | Nonerz   rw  )r/  r  r  r  rz   ry  )er~   
__future__r   r  re_rer   r   re  r7  r   r;  r   r   r   r+  r	   r  	functoolsr
   _total_orderingr   _re_compiler   r   r   r   r   r  r   r   r  	_warningsr   r  _arithmeticr   r   r   r   _metaclassesr   _DateTimeTyper   	_DateTyper   	_TimeTyper  typing_extensionsr   r  typing__all__r   r  r   r   r   r&   r'   r(   r*   r+   r-   r.   r6   ranger:   r;   ra  rF   rS   rW   r]   rY   r   _duration_base_classr   rT   r   r   r   _date_base_classr   rD  rp  r^   r%   _time_base_classr  r  r#   r!   r    _date_time_base_classr   r  r"   r$   rf   r  rD   s   00r5   <module>r     sI  & (   8 %   =  ;5 	
" $	= #&	= &
 - 
 - +6 , (  ,7C, (  0;	 0 ,   *} )+2 = 2).  .+63;;{+C ( C +0(Q,*G*G$D-
*G
/
 +0(Q,*G*G$D-
*G
1 h1--q" 
5M>$.. -6tI IXfF fFR  &!^0	#sC
3^0B 1 9
  W
y W
t QW%" >>$   6://#2//0
)x	y x	v 	
1Q1 	Bri   88. # 2 &  &" ]&$ ]& ]&@ $((3$((3oo  	8, T1aAq)	 
	GA]s   0MM9!M#