+
    yȇi?                        ^ RI Ht ^ RIHtHtHt ^ RIHt ^ RIHt ^ RI	t	^ RI
t
^ RIt
^ RIHt ^ RIt^ RIt^ RIHtHt ^ RIt^ RIHtHtHtHtHtHt ^ RIHt ^ R	IHt  ! R
 R4      t  ! R R4      t!R# )    )annotations)datetime	timedeltatimezone)partial)
attrgetterN)gettz)astype_overflowsafe	timezones)DatetimeIndexIndex	Timestamp
date_rangeoffsetsto_datetime)period_arrayc                     ] tR t^$tR tR tR t]P                  P                  R]
! R^RRR7      ]P                  ! R	^R
7      .4      R 4       tR tR tR tR tR t]P                  P                  RRR/RR/RRRR/.4      R 4       t]P                  P                  RRR/RR/RRRR/.4      R 4       tR tR tR tR tR t]P                  P                  RR.]! R^^4      ..4      R 4       tR  tR! tR" t]P                  P                  R#R$R%.4      R& 4       tR' t R( t!]P                  P                  R]"]#PH                  ]#PJ                  .4      R) 4       t&R* t'R+ t(]P                  P                  RR,R-])PT                  ! R-4      ]+! R.R-R/7      PX                  .4      R0 4       t-]P                  P                  R. RYO4      R2 4       t.R3 t/]P                  P                  R4]0]1.4      ]P                  P                  R5]#Pd                  ]3! ]#Pd                  ]"R67      ]4.4      ]P                  P                  R7RZR[.4      R8 4       4       4       t5R9 t6R: t7R; t8R< t9R= t:R> t;R? t<R@ t=RA t>]P                  P                  R])PT                  ! R14      ]?! R14      .4      RB 4       t@]P                  P                  RCR1RD.4      RE 4       tARF tB]P                  P                  RGRHRI.4      RJ 4       tC]P                  P                  RCR1RD.4      RK 4       tD]P                  P                  RRL]?! R14      .4      ]P                  P                  RMRNRO.4      ]P                  P                  RP]+]1.4      RQ 4       4       4       tE]P                  P                  R. R\O4      RR 4       tFRS tGRT tH]P                  P                  RRURV.4      RW 4       tIRXtJR,# )]TestDatetimeIndexc                	    \         P                  ! ^R4      p\        V.RR7      p\        VP                  R4      .RR7      p\        P
                  ! W#4       R# )   D
US/PacifictzM8[s]N)np
datetime64r   astypetmassert_index_equal)selfvalresultexpecteds   &   ڀ/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/indexes/datetimes/test_constructors.pytest_from_dt64_unsupported_unit1TestDatetimeIndex.test_from_dt64_unsupported_unit%   sF    mmAs#u6 #**W"5!6<H
f/    c                	&   \        R ^
RRR7      pRp\        P                  ! \        VR7      ;_uu_ 4        \	        VRR7       RRR4       \        P                  ! \        VR7      ;_uu_ 4        \	        \
        P                  ! V4      RR7       RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        \	        . R	RR
7       RRR4       R#   + '       g   i     L; i  + '       g   i     Lb; i  + '       g   i     R# ; i)
2016-01-01UTCnsperiodsr   unitz:Passed data is timezone-aware, incompatible with 'tz=None'matchNr   z3Cannot pass both a timezone-aware dtype and tz=NoneM8[ns, UTC]dtyper   )r   pytestraises
ValueErrorr   r   arrayr!   dtimsgs   &  r%   test_explicit_tz_none'TestDatetimeIndex.test_explicit_tz_none-   s    re$GJ]]:S11#$' 2 ]]:S11"((3-D1 2 D]]:S11"Md; 21 21 21 211s#   C0"C, C?C)	,C<	?D	c                	   R p\         P                  ! \        VR7      ;_uu_ 4        \        \        P
                  \        R4      .RR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        \        P
                  \        R4      P                  .RR7       RRR4       R#   + '       g   i     Lo; i  + '       g   i     R# ; i)QInferred frequency None from passed values does not conform to passed frequency Dr0   
2011-01-01r   freqN)r5   r6   r7   r   pdNaTr   _valuer!   r;   s   & r%   test_freq_validation_with_nat/TestDatetimeIndex.test_freq_validation_with_nat<   s    $ 	 ]]:S112669\#:;#F 2]]:S112669\#:#A#ABM 21 21111s   'B5:1C5C	C	indexr*   r   r,   r-   z1 Day)r.   c                	    VP                   pV. RO,          pVP                  e   Q hVP                  V4      pVP                  e   Q hR# )r   N)r            r   )_datarB   _shallow_copy)r!   rI   r8   arrr#   s   &&   r%   %test_shallow_copy_inherits_array_freq7TestDatetimeIndex.test_shallow_copy_inherits_array_freqI   sG     O$xx$$S){{"""r(   c                	H   \        \        P                  R RR .RR7      pWP                  3 Fq  p\        P                  ! V4      p\        P
                  ! V4      p\        P                  ! V4      pW4V3 F$  p\        V4      p\        P                  ! Wq4       K&  	  Ks  	  R# )z
2015-01-01z1999-04-06 15:14:13
US/Easternr   N)	r   rC   rD   rN   CategoricalIndexCategoricalSeriesr   r    )r!   r:   dtobjcicarrcserobjr#   s   &       r%   test_categorical_preserves_tz/TestDatetimeIndex.test_categorical_preserves_tz[   s    VV\#8,GL
 99%E $$U+B>>%(D99R=D$'&s+%%f2 ( &r(   c                	   \         P                  ! R R.RR7      p\        P                  ! \        RR7      ;_uu_ 4        \        V4       RRR4       \        P                  ! \        RR7      ;_uu_ 4        \        V4       RRR4       \        P                  ! \        RR7      ;_uu_ 4        \        \        V4      4       RRR4       \        P                  ! \        RR7      ;_uu_ 4        \        \        V4      4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Ly; i  + '       g   i     R# ; i)2016Q12016Q2QrA   zPeriodDtype data is invalidr0   N)rC   PeriodIndexr5   r6   	TypeErrorr   r   r   r!   datas   & r%    test_dti_with_period_data_raises2TestDatetimeIndex.test_dti_with_period_data_raisesl   s    ~~x2=]]9,IJJ$ K ]]9,IJJ K ]]9,IJJ,t,- K ]]9,IJJT*+ KJ KJ KJ KJ KJJs/   D7D"/D50ED	"D2	5E	E	c                	   \         P                  ! ^ .RR7      pRp\        P                  ! \        VR7      ;_uu_ 4        \        V4       RRR4       \        P                  ! \        VR7      ;_uu_ 4        \        V4       RRR4       \        P                  ! \        VR7      ;_uu_ 4        \        \        P                  ! V4      4       RRR4       \        P                  ! \        VR7      ;_uu_ 4        \        \        P                  ! V4      4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)r   zm8[ns]r4   z3timedelta64\[ns\] cannot be converted to datetime64r0   N)	r   r8   r5   r6   rd   r   r   rC   TimedeltaIndex)r!   rf   r;   s   &  r%   %test_dti_with_timedelta64_data_raises7TestDatetimeIndex.test_dti_with_timedelta64_data_raises|   s    xx8,D]]9C00$ 1 ]]9C00 1 ]]9C00"++D12 1 ]]9C00))$/0 10 10 10 10 100s0    D&8D90 E< E&D6	9E		E	E0	c                	    \        R 4      \        R4      .p\        P                  P                  V4      p\	        V4      p\        V4      \        J g   Q hVP                  VP                  8X  g   Q hR# )z2012-05-01T01:00:00.000000z2016-05-01T01:00:00.000000N)r   rC   arraysSparseArrayr   typer4   )r!   valuesrP   r#   s   &   r%   "test_constructor_from_sparse_array4TestDatetimeIndex.test_constructor_from_sparse_array   sd     2323
 ii##F+sF|u$$$||syy(((r(   c                	^   \         P                  ! R \        R^RR7      R\        R^\        P                  ! R4      RR7      R\        R4      \         P                  \        R4      .R	\        R^RRR
7      /4      pVP                  P                  P                  P                  R8X  g   Q hR# )dt20130101r,   )r.   r/   dttzrT   r-   dt_with_null20130103dtns)r.   rB   r/   N)rC   	DataFramer   zoneinfoZoneInfor   rD   rx   r4   r   key)r!   dfs   & r%   test_construction_caching+TestDatetimeIndex.test_construction_caching   s    \\jQTB
h.?.?.MTX j)FFj)!
 
:qt$O
 ww}}##|333r(   kwargsr   zdtype.tzr4   c                	    Tp\        R ^RVRR7      pVP                  4        UUu/ uF  w  rVV\        V4      ! V4      bK  	  ppp\        V3/ VB p\        P
                  ! WG4       R# u uppi )rw   hr,   r.   rB   r   r/   N)r   itemsr   r   r   r    )r!   r   tz_aware_fixturer   ir   r"   r#   s   &&&     r%   test_construction_with_alt,TestDatetimeIndex.test_construction_with_alt   sh    
 z132DI:@,,.I.hc#z#q)).Iq+F+
a( Js   A*c           	     	2   Tp\        R ^RVRR7      pVP                  R4      pVP                  4        UUu/ uF  w  rVV\        V4      ! V4      bK  	  pppRV9   dP   \	        VP
                  RR7      P                  VR,          4      p\	        V3/ VB p\        P                  ! Wx4       \	        VP                  R4      P
                  RR7      p	VP                  R4      P                  R4      p\        P                  ! W4       Rp
\        P                  ! \        V
R	7      ;_uu_ 4        \	        VP                  R4      P
                  VP                  \        P                  ! R
4      R7       RRR4       R# u uppi   + '       g   i     R# ; i)rw   r   r,   r   Nr   r+   r   -cannot supply both a tz and a dtype with a tzr0   z	US/Hawaiir3   )r   
_with_freqr   r   r   asi8
tz_convertr   r    tz_localizer5   r6   r7   r4   r}   r~   )r!   r   r   r   r   r   r"   r#   r$   i2r;   s   &&&        r%   &test_construction_with_alt_tz_localize8TestDatetimeIndex.test_construction_with_alt_tz_localize   s;   
 z132DILL:@,,.I.hc#z#q)).I6>"166e4??tMF$Q1&1H!!&3 1==.33>==&2259
b+ >]]:S11d#((gg$$[1 21 J 211s   E?/AFF	c                	   \        \        R 4      \        R4      .RR7      p\        \        R 4      \        R4      .RR7      p\        P                  ! WRR7       \        V\        4      '       g   Q hVP                  e   Q h\        \        RRR	7      \        R
RR	7      .RR7      p\        \        R4      \        R
4      .RRR7      p\        P                  ! WRR7       \        V\        4      '       g   Q hVP                  f   Q hVP                  VP                  8X  g   Q h\        \        RRR	7      \        RRR	7      .RR7      p\        \        R4      \        R4      .RRR7      p\        P                  ! WRR7       \        V\        4      '       g   Q hVP                  f   Q hVP                  VP                  8X  g   Q h\        \        R4      \        R
RR	7      .RR7      p\        \        R4      \        R
RR	7      .RRR7      p\        P                  ! WRR7       \        V\        4      '       d   Q h\        \        RRR	7      \        R
RR	7      .RR7      p\        \        RRR	7      \        R
RR	7      .RRR7      p\        P                  ! WRR7       \        V\        4      '       d   Q hRp\        P                  ! \        VR7      ;_uu_ 4        \        RR.4       RRR4       \        \        R 4      .RR7      p\        \        R 4      .RR7      p\        P                  ! WRR7       \        V\        4      '       g   Q hVP                  e   Q h\        \        RRR	7      .RR7      p\        \        R4      .RRR7      p\        P                  ! WRR7       \        V\        4      '       g   Q hVP                  f   Q hVP                  VP                  8X  g   Q hR#   + '       g   i     EL; i)r@   
2011-01-02idxnameTexactN2011-01-01 10:00
Asia/Tokyor   2011-01-02 10:00r   r   rT   2011-08-01 10:00objectr4   r   z6Mixed timezones detected. Pass utc=True in to_datetimer0   z2013-11-02 22:00-05:00z2013-11-03 22:00-06:00)
r   r   r   r   r    
isinstancer   r5   r6   r7   )r!   r#   expr;   s   &   r%   ,test_construction_index_with_mixed_timezones>TestDatetimeIndex.test_construction_index_with_mixed_timezones   s   	,/<1HIPUV|$i&=>U
 	f6&-0000yy    ,>,> 
 )*I6H,IJ

 	f6&-0000yy$$$yyCFF""" ,>,> 
 )*I6H,IJ

 	f6&-0000yy$$$yyCFF""" ,-,> 
 ,-,> 
 	f6fm4444,>,> 
 ,>,> 
 	f6fm4444F]]:S1135MNO 2 	,/0u=Y|45EB
f6&-0000yy    	"4FGeT)*+5
 	f6&-0000yy$$$yyCFF"""% 211s   #O77P	c           
     	   \        \        P                  \        R 4      \        P                  \        R4      .RR7      p\	        \        P                  \        R 4      \        P                  \        R4      .RR7      p\
        P                  ! WRR7       \        V\        4      '       g   Q hVP                  e   Q h\        \        P                  \        RRR	7      \        P                  \        R
RR	7      .RR7      p\	        \        P                  \        R4      \        P                  \        R
4      .RRR7      p\
        P                  ! WRR7       \        V\        4      '       g   Q hVP                  f   Q hVP                  VP                  8X  g   Q h\        \        RRR	7      \        P                  \        RRR	7      .RR7      p\	        \        R4      \        P                  \        R4      .RRR7      p\
        P                  ! WRR7       \        V\        4      '       g   Q hVP                  f   Q hVP                  VP                  8X  g   Q h\        \        P                  \        R4      \        P                  \        R
RR	7      .RR7      p\        \        P                  \        R4      \        P                  \        R
RR	7      .RRR7      p\
        P                  ! WRR7       \        V\        4      '       d   Q h\        \        P                  \        RRR	7      \        P                  \        R
RR	7      .RR7      p\        \        P                  \        RRR	7      \        P                  \        R
RR	7      .RRR7      p\
        P                  ! WRR7       \        V\        4      '       d   Q h\        \        P                  \        P                  .RR7      p\	        \        P                  \        P                  .RR7      p\
        P                  ! WRR7       \        V\        4      '       g   Q hVP                  e   Q hR# )r@   r   r   r   Tr   Nr   r   r   r   r   rT   r   r   r   )	r   rC   rD   r   r   r   r    r   r   )r!   r#   r   s   &  r%   5test_construction_index_with_mixed_timezones_with_NaTGTestDatetimeIndex.test_construction_index_with_mixed_timezones_with_NaT9  s   VVY|,bffi6MN
 VVY|,bffi6MN
 	f6&-0000yy    ,>,>	 
 ,-,-	 	
 	f6&-0000yy$$$yyCFF""" ,>,>
 
 )*BFFI>P4QR

 	f6&-0000yy$$$yyCFF""" ,-,>	 
 ,-,>	 	
 	f6fm4444,>,>	 
 ,>,>	 	
 	f6fm4444 'e4RVVRVV,59
f6&-0000yy   r(   c           
     	   \        \        R 4      \        R4      .RR7      p\        \        R 4      \        R4      .RR7      p\        P                  ! WRR7       \	        V\         4      '       g   Q h\        \        RRR7      \        R	RR7      .RR7      p\        \        R4      \        R	4      .RRR
7      p\        P                  ! WRR7       \	        V\         4      '       g   Q h\        \        RRR7      \        RRR7      .RR7      p\        \        R4      \        R4      .RRR
7      p\        P                  ! WRR7       \	        V\         4      '       g   Q hRp\
        P                  ! \        VR7      ;_uu_ 4        \        \        RRR7      \        R	RR7      .RR7       RRR4       \        \        R4      \        R	RR7      .RRR
7      p\        \        RRR7      \        R	RR7      P                  R4      .RRR
7      p\        P                  ! WE4       \        \        RRR7      \        R	RR7      .RRR
7      p\        \        RRR7      P                  R4      \        R	RR7      .RRR
7      p\        P                  ! WE4       \        \        RRR7      \        R	RR7      .RRR7      p\        P                  ! WE4       R#   + '       g   i     EL/; i)r@   r   r   r   Tr   r   r   r   r   r   rT   r   z!cannot be converted to datetime64r0   NzM8[us, US/Eastern]r   )	r   r   r   r    r   r5   r6   r7   r   )r!   r#   r   r;   r:   r$   s   &     r%   *test_construction_dti_with_mixed_timezones<TestDatetimeIndex.test_construction_dti_with_mixed_timezones  s    |$i&=>U
 |$i&=>U
 	f6&-0000 ,>,> 
 )*I6H,IJ

 	f6&-0000 ,>,> 
 )*I6H,IJ

 	f6&-0000 2]]:S110\B0\B  2 ,-,> 
 !,>,>II,W 
 	c, ,>,> 
 !,>II,W,> 
 	c, ,>,> '
 	c,w 211s   &KK$	c                	   \        R 4      \        P                  \        R4      .p\        P                  ! \        V4      \        V4      4       \        P                  ! \        \        P                  ! V4      4      \        \        P                  ! V4      4      4       \        P                  \        P                  \        R4      .p\        P                  ! \        V4      \        V4      4       \        P                  ! \        \        P                  ! V4      4      \        \        P                  ! V4      4      4       R# )r@   z
2011-01-03N)
r   rC   rD   r   r    r   r   r   r8   nan)r!   rP   s   & r%   "test_construction_base_constructor4TestDatetimeIndex.test_construction_base_constructor  s    &	,0GH
eCj-*<=
eBHHSM2M"((3-4PQvvrvvy67
eCj-*<=
eBHHSM2M"((3-4PQr(   c                	    \        R ^^4      \        R^^4      \        R^^4      \        R^^4      .p\        VRR7      p\        V4      p\        P                  ! W24       \	        V4       R# )i  i  i  ip  M8[us]rj   N)r   r   r   r    r   )r!   datesr   ress   &   r%   test_construction_outofbounds/TestDatetimeIndex.test_construction_outofbounds  sh     T1a T1a T1a T1a 	
 E*El
c'er(   rf   z
1400-01-01ix  c                	    \        V4       R # )N)r   re   s   &&r%   test_dti_date_out_of_range,TestDatetimeIndex.test_dti_date_out_of_range+  s     	dr(   c                	2   \        R ^
^4      \        R ^
^4      \        R ^
^	4      .p\        V\        P                  ! 4       R7      P                  p\        V\        P                  ! 4       R7      p\        . RORRR7      p\
        P                  ! W44       R# )i  rA   r   Br4   rB   N)z
2013-10-07z
2013-10-08z
2013-10-09)r   r   r   BDayrr   r   r    )r!   r   rf   r#   r$   s   &    r%   test_construction_with_ndarray0TestDatetimeIndex.test_construction_with_ndarray0  su    $A&r1(=xbRS?TUU8??t',,.9 6hS
 	f/r(   c                	   \         P                  ! R R4      p\         P                  ! VP                  R4      .4      p\	        V4      P                  R4      p\	        R.RR7      p\        P                  ! W44       \        P                  ! R4      ;_uu_ 4        \	        VRR	7      pRRR4       \	        R.R
R7      p\        P                  ! W44       R#   + '       g   i     L6; i)z2000-01-01 00:00:00r,   i8
US/Centralz2000-01-01T00:00:00zM8[ns, US/Central]rj   Nr+   r   r2   )	r   r   r8   viewr   r   r   r    assert_produces_warning)r!   r"   rr   r#   r$   s   &    r%   -test_integer_values_and_tz_interpreted_as_utc?TestDatetimeIndex.test_integer_values_and_tz_interpreted_as_utc:  s    mm148388D>*+v&22<@ "7!8@TU
f/ ''--"6e4F . "7!8N
f/ .-s   CC&	c           
     	   R p\         P                  ! \        VR7      ;_uu_ 4        \        R4       RRR4       R \	        ^
4       4       p\        V4      p\        \	        ^
4       Uu. uF   p\        R^^4      \        V4      ,           NK"  	  up4      p\        P                  ! W54       \        P                  ! . RO4      p\        V4      p\        VP                  R4      4      p\        P                  ! W54       \        VP                  R4      P                  4      P                  R4      p\        P                  ! Wu4       \        P                  ! . RO4      p\        V4      p\        VP                  R4      4      p\        P                  ! W54       \        VP                  R4      P                  4      P                  R4      p\        P                  ! Wu4       R	p\         P                  ! \        VR7      ;_uu_ 4        \        . ROR
R7       RRR4       R#   + '       g   i     EL; iu upi   + '       g   i     R# ; i)z8DatetimeIndex\(\.\.\.\) must be called with a collectionr0   1/1/2000Nc              3  \   "   T F"  p\        R ^^4      \        V4      ,           x  K$  	  R# 5i)  N)r   r   ).0r   s   & r%   	<genexpr>>TestDatetimeIndex.test_constructor_coverage.<locals>.<genexpr>P  s%     FIqxa#il22Is   *,r   Or,   usr?   r   rA   )
2000-01-01
2000-01-02z
2000-01-03)r   r   rD   )r   r   z
2000-01-04)r5   r6   rd   r   ranger   r   r   r    r   r8   r   as_unitr   r7   )r!   r;   genr#   r   r$   strings	from_intss   &       r%   test_constructor_coverage+TestDatetimeIndex.test_constructor_coverageJ  s   I]]9C00*% 1 GE"IFs# :?)D)QXdAq!IaL00)D
 	f/ ((EFw' !45
f/!("2"24"8"="=>FFtL	
i2 ((>?w' !45
f/!("2"24"8"="=>FFtL	
i2$ 	 ]]:S11D3O 21E 100 E6 211s   H%*&H9H>%H6	>I	rB   YSzW-SUNc                	   \        R RVR7      p\        RRV\        \        RR7      4      R7      p\        P                  ! W#4       \        RRVRR7      p\        P
                  ! VP                  VP                  4       \        RR	VR7      p\        RRV\        \        R
R7      4      R7      p\        P                  ! W#4       \        RRVRR7      p\        P
                  ! VP                  VP                  4       \        RRVR7      p\        RRV\        \        RR7      4      R7      p\        P                  ! W#4       \        RRVRR7      p\        P
                  ! VP                  VP                  4       \        RRVR7      p\        RRV\        \        R
R7      4      R7      p\        P                  ! W#4       \        RRVRR7      p\        P
                  ! VP                  VP                  4       R# )z2013-01-01T00:00:00-05:00z2016-01-01T23:59:59-05:00rA   z2013-01-01T00:00:00z2016-01-01T23:59:59)minutesrB   r   zAmerica/Limaz2013-01-01T00:00:00+09:00z2016-01-01T23:59:59+09:00i  r   z2013/1/1 0:00:00-5:00z2016/1/1 23:59:59-5:00z2013/1/1 0:00:00+9:00z2016/1/1 23:59:59+09:00Ni)r   r   r   r   r    assert_numpy_array_equalr   )r!   rB   r   r$   expected_i8s   &&   r%   $test_constructor_datetime64_tzformat6TestDatetimeIndex.test_constructor_datetime64_tzformatq  s    ')D4
 !!	$/0	
 	c, !#8t
 	##CHHk.>.>?')D4
 !!	#./	
 	c, !#8t
 	##CHHk.>.>? 02JQUV!!	$/0	
 	c, !#8t
 	##CHHk.>.>?02KRVW!!	#./	
 	c, !#8t
 	##CHHk.>.>?r(   c                	   \        R R.RR7      p\        R R.4      P                  R4      P                  R4      p\        P                  ! W4       \        R R.RR7      P                  R4      p\        P                  ! W4       R# )
2013-01-01
2013-01-02datetime64[ns, US/Eastern]rj   r,   rT   r   N)r   r   r   r   r    )r!   r   r$   s   &  r%   test_constructor_dtype(TestDatetimeIndex.test_constructor_dtype  sy    <(0L
 <67WT][& 	
 	c,\<8\JRRSWX
c,r(   c                	F   \        R R.RR7      pRp\        P                  ! \        VR7      ;_uu_ 4        \        VRR7       RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        \        VR	R7       RRR4       R
p\        P                  ! \        VR7      ;_uu_ 4        \        VRRR7       RRR4       \        VRR7      p\
        P                  ! W4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L[; i)r   r   r   rj   zNcannot supply both a tz and a timezone-naive dtype \(i\.e\. datetime64\[ns\]\)r0   datetime64[ns]NzDdata is already tz-aware US/Eastern, unable to set specified tz: CETzdatetime64[ns, CET]r   CET)r   r4   )r   r5   r6   r7   rd   r   r    )r!   r   r;   r#   s   &   r%   )test_constructor_dtype_tz_mismatch_raises;TestDatetimeIndex.test_constructor_dtype_tz_mismatch_raises  s    <(0L

+ 	 ]]:S11#%56 2 U]]9C00#%:; 1=]]:S11#%/KL 2 s*FG
c* 21
 10 21s#   C*2C=.D*C:	=D	D 	c                	    R p\         P                  ! \        VR7      ;_uu_ 4        \        ^^.VR7       RRR4       R#   + '       g   i     R# ; i)zUnexpected value for 'dtype'r0   rj   N)r5   r6   r7   r   )r!   r4   r;   s   && r%   %test_constructor_invalid_dtype_raises7TestDatetimeIndex.test_constructor_invalid_dtype_raises  s7     -]]:S111a&. 2111s   AA	c                	|    \        R4      p\        V.4      pVP                  ^ ,          VP                  8X  g   Q hR# )i#PNl   )b0Z4 )r   r   
nanosecond)r!   t1r   s   &  r%   test_000constructor_resolution0TestDatetimeIndex.test_000constructor_resolution  s4    EFRD!~~a BMM111r(   c                	    \        R .RR7      pRp\        P                  ! \        VR7      ;_uu_ 4        \        P
                  ! R4      Vn        RRR4       R#   + '       g   i     R# ; i)2010r+   r   zCannot directly set timezoner0   r   N)r   r5   r6   AttributeErrorr}   r~   r   r9   s   &  r%   test_disallow_setting_tz*TestDatetimeIndex.test_disallow_setting_tz  sG    VH/,]]>55&&|4CF 6555s   AA,	NAmerica/Los_Angeles2000r   c                	    \        R RR7      p\        RRR7      p\        RW#VRR7      p\        R R.RRR7      p\        P                  ! WE4       \
        P                  ! R4      VP                  J g   Q hR	# )
z2013-01-01 06:00:00r   r   z2013-01-02 06:00:00r   r,   )rB   startendr   r/   zM8[ns, America/Los_Angeles]r   N)r   r   r   r   r    r}   r~   r   )r!   r   r   r   r#   r$   s   &&    r%   "test_constructor_start_end_with_tz4TestDatetimeIndex.test_constructor_start_end_with_tz  sw     /4IJ-2GHErM "$9:/

 	f/  !67699DDDr(   rT   c                	    \         P                  ! R 4      pVP                  V4      p\        RVR7      P                  p\        R.VR7      pVP                  V4      VP                  J g   Q hR# )pytzr   r   N)r5   importorskipr   r   r   r   )r!   r   r  tz_innon_norm_tzr#   s   &&    r%   )test_constructor_with_non_normalized_pytz;TestDatetimeIndex.test_constructor_with_non_normalized_pytz  s]     ""6*b!5144xK8}}R FII---r(   c                	&   \        R RR7      \        RRR7      .p\        V4      P                  R4      p\        V^ ,          P                  4       V^,          P                  4       .4      P                  R4      p\        P
                  ! W#4       R# )z2016-10-30 03:00:00+0300zEurope/Helsinkir   z2016-10-30 03:00:00+0200r,   N)r   r   r   to_pydatetimer   r    )r!   tsr#   r$   s   &   r%   #test_constructor_timestamp_near_dst5TestDatetimeIndex.test_constructor_timestamp_near_dst  s     05FG05FG
 r"**40 U  "BqE$7$7$9:

'$- 	 	f/r(   klassboxrj   z	tz, dtypec                	    \        R VR7      P                  R4      pV! V! VP                  .4      VR7      pV! V.4      pWg8X  g   Q hR# )z
2018-01-01r   r,   rj   N)r   r   rE   )r!   r  r  r   r4   r	  r#   r$   s   &&&&&   r%   test_constructor_with_int_tz.TestDatetimeIndex.test_constructor_with_int_tz  sI     |+33D9sBII;'u5";!!!r(   c                	\    TpR p\        V.VR7      P                  ^ ,          pW48X  g   Q hR# )l     _S r   N)r   r   )r!   tz_naive_fixturer   r#   r$   s   &&   r%   test_construction_int_rountrip0TestDatetimeIndex.test_construction_int_rountrip$  s1    $ &b166q9!!!r(   c           
     	   \        \        R ^^4      \        R^^4      RRRR7      p\        V Uu. uF  q"P                  ^^R7      NK  	  up4      p\        . R	ORR7      P	                  R4      p\
        P                  ! W44       R# u upi )
r     zYE-DECzAustralia/Melbourner,   )rB   r   r/   )monthdayr   N)z2000-06-01 00:00:00z2001-06-01 00:00:00z2002-06-01 00:00:00z2003-06-01 00:00:00z2004-06-01 00:00:00z2005-06-01 00:00:00)r   r   r   replacer   r   r    )r!   rI   xr#   r$   s   &    r%   3test_construction_from_replaced_timestamps_with_dstETestDatetimeIndex.test_construction_from_replaced_timestamps_with_dst,  s    dB#dB#$
 5I5a		q	 95IJ  %

 '$- 	 	f/  Js   Bc                	    \        R ^RR7      pRp\        P                  ! \        VR7      ;_uu_ 4        \	        VRR7       RRR4       R#   + '       g   i     R# ; i)r*   r   )r.   r   z?data is already tz-aware US/Central, unable to set specified tzr0   r   r   N)r   r5   r6   rd   r   r9   s   &  r%   *test_construction_with_tz_and_tz_aware_dti<TestDatetimeIndex.test_construction_with_tz_and_tz_aware_dtiC  s?    q\BO]]9C00#,/ 1000s   AA	c                	   \         P                  P                  4       p\        R R.VR7      P	                  R4      p\        \        R VR7      \        P                  .4      P	                  R4      p\        P                  ! W#4       R# )2018rD   r   r,   N)
dateutilr   tzlocalr   r   r   rC   rD   r   r    )r!   r   r#   r$   s   &   r%   &test_construction_with_nat_and_tzlocal8TestDatetimeIndex.test_construction_with_nat_and_tzlocalJ  sb    [[  "26>>tD )Fr":BFF!CDLLTR
f/r(   c                	D   \        R R.RRRR7      pRp\        R^^^R7      P                  VRR	7      p\        V^RR
R7      p\        P
                  ! WA4       Rp\        R^^^R7      P                  VRR	7      p\        V^RR
R7      p\        P
                  ! WA4       R# )z2020-11-01 01:00:00z2020-11-02 01:00:00z datetime64[ns, America/New_York]r   F)r4   rB   	ambiguouszAmerica/New_Yorki  )yearr  r  hour)r'  r,   )r   r.   r'  r/   )r   r.   r'  r/   N)r   r   r   r   r   r    )r!   r$   r   r   r#   r   s   &     r%   +test_constructor_with_ambiguous_keyword_arg=TestDatetimeIndex.test_constructor_with_ambiguous_keyword_argP  s     !"$9:4	
 &t211=II J 
 %e$O
f/ &T;GG H 
 Q%dK
f/r(   c                	   Tp\        R 4      P                  VRR7      p\        V^RRR7      p\        \        RVR7      \        RVR7      .4      P	                  R4      p\
        P                  ! WE4       Tp\        V^RRR	7      p\        \        R
VR7      \        RVR7      .4      P	                  R4      p\
        P                  ! WE4       R# )z2015-03-29 02:30:00shift_forward)nonexistentr   r,   )r   r.   rB   r/   z2015-03-29 03:00:00+02:00r   z2015-03-29 04:00:00+02:00)r   r.   rB   r/   z2015-03-29 01:00:00+01:00N)r   r   r   r   r   r   r    )r!   warsawr   r   r#   r$   r   s   &&     r%   -test_constructor_with_nonexistent_keyword_arg?TestDatetimeIndex.test_constructor_with_nonexistent_keyword_argj  s     /0<</ = 
 %4H 5(C5(C

 '$- 	 	f/ QStD 5(C5(C

 '$- 	 	f/r(   c                	H   R p\         P                  ! \        VR7      ;_uu_ 4        \        R.RR7       RRR4       Rp\         P                  ! \        VR7      ;_uu_ 4        \	        R.RR7       RRR4       R#   + '       g   i     LO; i  + '       g   i     R# ; i)z with no precision is not allowedr0   r   r   rj   Nz2The 'datetime64' dtype has no unit. Please pass in)r5   r6   r7   r   r   rF   s   & r%   $test_constructor_no_precision_raises6TestDatetimeIndex.test_constructor_no_precision_raises  sm     1]]:S116(,7 2 C]]:S116(,/ 21	 21 211s   A=$B=B	B!	c                	~    \        R .RR7      pVP                  R8X  g   Q hV^ ,          \        R^^4      8X  g   Q hR# )r   zdatetime64[us]rj   r   r   N)r   r4   r   )r!   r:   s   & r%   'test_constructor_wrong_precision_raises9TestDatetimeIndex.test_constructor_wrong_precision_raises  s>    VH,<=yyH$$$1v4A....r(   c           	     	    \        \        P                  ! \        R RR7      \        P                  .\
        R7      4      p\        \        R RR7      \        P                  .4      p\        P                  ! W4       R# )2019r+   r   rj   N)r   r   r8   r   r   r   r   rC   rD   r   r    )r!   r#   r$   s   &  r%   Htest_index_constructor_with_numpy_object_array_and_timestamp_tz_with_nanZTestDatetimeIndex.test_index_constructor_with_numpy_object_array_and_timestamp_tz_with_nan  sO    rxx6e!<bff EVTU )Fu"=rvv!FG
f/r(   c                	    \        R ^^VR7      .p\        V4      p\        P                  ! VP                  V4      '       g   Q hR# )  )tzinfoN)r   r   r   
tz_comparer   )r!   r   drI   s   &&  r%   test_dti_from_tzaware_datetime0TestDatetimeIndex.test_dti_from_tzaware_datetime  s>     dAr"-.a ##EHHb1111r(   tzstrzdateutil/US/Easternc                b   RR.p\        V4      P                  V4      p\        RR^VRR7      pVP                  R4      p\	        W!R7      p\	        \
        P                  ! V4      VR7      p\        P                  ! W44       \        P                  ! W54       \        P                  ! W64       R# )	zNTest different DatetimeIndex constructions with timezone
Follow-up of GH#4229
z11/10/2005 08:00:00z11/10/2005 09:00:00z2005-11-10 08:00:00r   r   )r   rB   r.   r   r/   Nr   )	r   r   r   r   r   r   r8   r   r    )r!   rC  rP   idx1idx2idx3idx4s   &&     r%   test_dti_tz_constructors*TestDatetimeIndex.test_dti_tz_constructors  s    
 %&;<3++E2'c1T
 t$S+RXXc]u5
d)
d)
d)r(   c                	l    \        R ^
RRVR7      p\        VRR7      p\        P                  ! W#4       R# )z03/12/2012 00:00zW-FRIrT   r   )rf   r   Nr   r   r   r    )r!   r/   rngrng2s   &&  r%    test_dti_construction_idempotent2TestDatetimeIndex.test_dti_construction_idempotent  s4    \PT
 #,7
c(r(   prefix z	dateutil/c                	p    \        \        R ^^4      .VR,           R7      pVP                   V^ ,           R# )r=  ESTr   N)r   r   r)  )r!   rQ  rI   s   && r%   "test_dti_constructor_static_tzinfo4TestDatetimeIndex.test_dti_constructor_static_tzinfo  s0     xa34%H

ar(   c                	~    \        R ^
VRR7      p\        \        V4      RRR7      p\        P                  ! W#4       R# )z
2012-06-02foo)r.   r   r   r   )r   rB   N)r   r   listr   r    )r!   rC  drdr2s   &&  r%   test_dti_convert_datetime_list0TestDatetimeIndex.test_dti_convert_datetime_list  s2    bUGDH5s;
b&r(   zpytz/US/Easternuse_strTFbox_clsc                	   \        V\        4      '       dN   VP                  R 4      '       d7   \        P                  ! R4      pVP                  VP                  R 4      4      pRpTpV'       g   \        V4      P                  4       pV\        Jd   V.pV'       g\   \        V\        P                  P                  4      '       d2   \        P                  P                  RR7      pVP                  V4       \        P                  ! \         VR7      ;_uu_ 4        V! WqR7       RRR4       R#   + '       g   i     R# ; i)zpytz/r  z2013-11-03 01:59:59.999999zWe implicitly get fold=0.)reasonr0   r   N)r   str
startswithr5   r  r   removeprefixr   r  r"  r   tzfilemarkxfailapplymarkerr6   r7   )	r!   r   r^  r_  requestr  dtstritemrf  s	   &&&&&    r%   $test_dti_ambiguous_matches_timestamp6TestDatetimeIndex.test_dti_ambiguous_matches_timestamp  s     b#2==#9#9&&v.Drw78B,U#113D)#6D:b(++*<*<==
 ;;$$,G$HD%]]:U33D  4333s   
D11E	c                	   \        R 4      pRpVe   RV R2pVRR.p\        WCR7      pV^ ,          P                  V4      \        V^,          VR7      \        V^,          R	R
R7      P	                  V4      .pV Uu. uF  qwP                  R	4      P                  NK  	  pp\        P                  ! VRR7      p	\        V	RR7      p
Ve!   V
P                  R4      P	                  V4      p
\        P                  ! WZ4       \        \        P                  ! V\        R7      VR7      p\        P                  ! W4       R# u upi )z
2999-01-01r   NzM8[us, ]z2999-01-02 03:04:05.678910i	  rj   r   r   T)r/   utcr+   )r   r   r   r   r   r   asm8r   r8   r   r    r   )r!   r   r	  r4   valsr#   	pointwiser  exp_valsexp_arrr$   result2s   &&          r%   (test_dti_constructor_with_non_nano_dtype:TestDatetimeIndex.test_dti_constructor_with_non_nano_dtype  s    |$>bTOE0$7t1
 G#d1g"%Qd5@@D
	
 3<<)QIIdO(()<((884 9>++E2==bAH
f/V <EJ
g0 =s   <#D?c                	|   \         P                  ! 4       p\         P                  ! 4       p\        R R.RR7      pVP                  R8X  g   Q hV^ ,          VP                  R4      ,
          pV^,          VP                  R4      ,
          pV\        P                  ! ^ 4      8  g   Q RV 24       hV\        P                  ! ^ 4      8  g   Q RV 24       hVP                  \        P                  P                  RRR7      4       \        P                  ! ^R	7      pWW8  g   Q RV 24       hWg8  g   Q RV 24       hR
# )nowtodayr   rj   szThe difference is z)result may not exactly match [now, today]F)ra  strict)secondsN)r   rz  r{  r   r4   r   rC   	Timedeltarh  r5   rf  rg  )r!   ri  rz  r{  r#   diff0diff1	tolerances   &&      r%   ,test_dti_constructor_with_non_nano_now_today>TestDatetimeIndex.test_dti_constructor_with_non_nano_now_today
  s   mmo!w/w?||w&&&q	CKK,,q	EMM#..Q'E+=eW)EE'Q'E+=eW)EE'
 	KKB5  	

 LL+	 >$6ug">>  >$6ug">> r(   c                	    \         P                  ! ^ \         P                  .\         P                  R7      pVP	                  \
        4      p\        VRR7      p\        VRR7      p\        P                  ! W44       R# )r   rj   r   r   N)	r   r8   r   float64r   r   r   r   r    )r!   rP   arr2dti1dti2s   &    r%   5test_dti_constructor_object_float_matches_float_dtypeGTestDatetimeIndex.test_dti_constructor_object_float_matches_float_dtype"  sR    hh266{"**5zz&!SU+Te,
d)r(   r   zM8[us, US/Pacific]c                	   \         P                  ! ^RR7      R,          p\        P                  P                  V^ &   VP                  \         P                  4      p\         P                  V^ &   VP                  \        4      p\        P                  V^ &   VP                  \        4      p\        W!R7      p\        W1R7      p\        WAR7      p\        WQR7      p	\        VP                  R4      4      p
VP                  e+   V
P                  R4      P                  VP                  4      p
\        P                  ! Wj4       \        P                  ! Wz4       \        P                  ! W4       \        P                  ! W4       R# )   r   rj     r   Nr+   )r   arangerC   rD   valuer   r  r   r   r   r   r   r   r   r   r    )r!   r4   vals1vals2vals3vals4res1res2res3res4r$   s   &&         r%   <test_dti_constructor_with_dtype_object_int_matches_int_dtypeNTestDatetimeIndex.test_dti_constructor_with_dtype_object_int_matches_int_dtype+  s    		!4(4/66<<aRZZ(66aV$ 66aV$U0U0U0U0 H!5677++E2==dggFH
d-
d-
d-
d-r(    )r   rT   r   )r   zdatetime64[ns, US/Pacific])Nr   )Nr+   r   )K__name__
__module____qualname____firstlineno__r&   r<   rG   r5   rf  parametrizer   rC   timedelta_rangerQ   r]   rg   rl   rs   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   int32int64r   r   r   r}   r~   r   r   r   r  r
  r   r   r8   r   rY  r  r  r  r  r$  r*  r0  r3  r6  r:  r	   rA  rI  rO  rU  r\  rl  rw  r  r  r  __static_attributes__r  r(   r%   r   r   $   s   0<
N [[|Q<dKw2	
	#	#3", 1 	)4" [[

	gw/'7D*1UV)	) [[

	gw/'7D*1UV	4f#Pl!\k-ZR [[V|nxa7K6L%MN O00 %PN [[VdG_5;@ 6;@z-+0 [[Wvrxx&BC/ D/25 [[!34f!67::		
EE [[T#MN. O.
0 [[Wum&<=[[URXXwrxxv/NPT$UV[[	57OP"	 W >""0.00040<	0/
0 [[x  .l0CD22 [[W|5J&KL* M*$) [[XK'89 : [[W|5J&KL' M'
 [[,	
 [[Yu6[[YM(BC! D 7!0 [[T#>?1 @14?0* [[Wx1E&FG. H.r(   r   c                      ] tR tRtR tR tR tR tR tR t	]
P                  P                  R. RO4      R	 4       tR
 tR tRtR# )TestTimeSeriesiJ  c                	r    \        R RRR7      p\        V4      pVP                  VP                  8X  g   Q hR# r   z1/2/20005minrA   N)r   r   rB   )r!   rM  rN  s   &  r%   &test_dti_constructor_preserve_dti_freq5TestTimeSeries.test_dti_constructor_preserve_dti_freqK  s0    Zf=S!xx499$$$r(   c                	    \        R RRR7      p\        VRR7      pVP                  e   Q h\        VP                  RR7      pVP                  e   Q hR# r  )r   r   rB   rN   )r!   rM  r#   s   &  r%   test_explicit_none_freq&TestTimeSeries.test_explicit_none_freqQ  sL    Zf=s.{{"""syyt4{{"""r(   c                	    \        . RO4      p\        P                  ! . ROVR7      p\        P                  ! \        V4      V4       R# )1970-01-01 00:00:00.00000000rj   N)r  z1970-01-01 00:00:00.00000001z1970-01-01 00:00:00.00000002)r   
      )r   r   r8   r   r    )r!   any_int_numpy_dtyper   rP   s   &&  r%   test_dti_constructor_small_int-TestTimeSeries.test_dti_constructor_small_int[  s9    
 hh{*=>
mC0#6r(   c                	R    \        R .4      pV^ ,          P                  ^8X  g   Q hR# )z1-1-2000 00:00:01N)r   second)r!   rM  s   & r%   test_ctor_str_intraday%TestTimeSeries.test_ctor_str_intradayh  s&    0121v}}!!!r(   c                	   \         P                  ! ^ ^d^
\         P                  R7      P                  R4      p\	        V4      pVP
                  \        V\         P                  ! R4      R7      8H  P                  4       '       g   Q hR# )r   rj   zM8[D]zM8[ns]N)	r   r  r  r   r   rr   r
   r4   all)r!   rP   r   s   &  r%   &test_index_cast_datetime64_other_units5TestTimeSeries.test_index_cast_datetime64_other_unitsl  s]    ii3"((388ACj

1#RXXh=OPPUUWWWWr(   c                	   \         P                  ! R \         P                  R7      p\        VRR7      pRVR&   VP                  R,          R8H  P                  4       '       g   Q h\         P                  ! R \         P                  R7      p\        VRR7      pRVR&   VP                  R,          R8g  P                  4       '       g   Q hR# )r  rj   F)copy:2   d   NTN)r   r  r  r   r   r  )r!   rP   rI   s   &  r%   test_constructor_int64_nocopy,TestTimeSeries.test_constructor_int64_nocopyr  s    iiBHH-c.F

6"b(--////iiBHH-c-F

6"b(--////r(   rB   c                	    \        R V^R7      p\        W!R7      p\        P                  ! W24       \        R VR^R7      p\        W!RR7      p\        P                  ! W24       R# )z2001/02/01 09:00)r   rB   r.   rA   r   )r   rB   r   r.   r   NrL  )r!   rB   orgr   s   &&  r%   !test_from_freq_recreate_from_data0TestTimeSeries.test_from_freq_recreate_from_data  sZ    
 1aHC+
c'$4L!
 C|<
c'r(   c                	p   . ROpRp\         P                  ! \        VR7      ;_uu_ 4        \        V4       RRR4       . ROp\        V4      p\	        R^^4      RRR.p\        V4      p\        \	        R^^4      4      RRR.p\        V4      p\        P                  ! . RORR	7      p\        V4      p\        R
R.RR7      p\        RR.RRR7      p\        P                  ! Wx4       WEV3 F2  p	VP                  V	P                  8H  P                  4       '       d   K2  Q h	  R#   + '       g   i     L; i)1/1/20051/2/2005
2005-01-04z9(\(')?Unknown datetime string format(:', 'Jn 3, 2005'\))?r0   N1/3/2005r  r   rj   z
12/05/2007z
25/01/2008T)dayfirstz
2007/05/12z
2008/01/25F)r  	yearfirst)r  r  z
Jn 3, 2005r  )r  r  r  r  )r5   r6   r7   r   r   r   r   r8   r   r    rr   r  )
r!   rP   r;   rE  rF  rG  rH  idx5idx6others
   &         r%   #test_datetimeindex_constructor_misc2TestTimeSeries.test_datetimeindex_constructor_misc  s   BJ]]:S11# 2 AS!a#Z\JS!$1-.
JUS!hhIQTUS!lL9DI<(5D
 	d)$'EKK5<</446666 (+ 21s   D%%D5	c                	
   R p\        R^
^RR7      p\        R^
^RR7      p\        V.RRR7      p\        V.4      p\        P                  ! WE4       \        V.RRR7      p\        V.4      p\        P                  ! Wg4       R# )	z5/10/16i  r   r   r  T)r   r  )r   r  N)r   r   r   r    )r!   r"   dfirstyfirstresult1	expected1rv  	expected2s   &       r%   <test_dti_constructor_object_dtype_dayfirst_yearfirst_with_tzKTestTimeSeries.test_dti_constructor_object_dtype_dayfirst_yearfirst_with_tz  s{    4Q<84RL9,F!6(+	
g1,$G!6(+	
g1r(   r  N)MEQEYEr   r   bhminr|  msr   r   r,   C)r  r  r  r  r  r  r  r  r  r  r5   rf  r  r  r  r  r  r  r(   r%   r  r  J  sT    %#7"X0 [[R	(		(762r(   r  )"
__future__r   r   r   r   	functoolsr   operatorr   r}   r"  dateutil.tzr	   numpyr   r5   pandas._libs.tslibsr
   r   pandasrC   r   r   r   r   r   r   pandas._testing_testingr   pandas.core.arraysr   r   r  r  r(   r%   <module>r     sa    " 
        
    +c. c.L!m2 m2r(   