+
    ¾¾jÞ  ã                   óÚ  € R t ^ RIHtHtHtHt ^ RIt^ RIHtHt ^ RI	H
t
 ]! R^^]P                  R7      tR tR t]P                  P!                  R R	]! R^^4      ]! R^^4      33R
]! R^^4      ]! ^R7      33R]! R^^^4      ]! R^^4      33.4      R 4       t]P                  P!                  R . R!O4      R 4       t]P                  P!                  R R"R#.4      R 4       tR tR tR tR tR t]P                  P!                  R$]! R^^4      ]! R^^4      3R3]! R^^4      ]! ^R7      3R3]! R^^4      ]! R^^^4      3R3.4      R 4       tR tR tR tR tR tR tR t R# )%a$  Periods written with dates are read as midnight datetimes.

RFC 5545, section 3.3.9, builds a period from datetimes only. A period
written with dates used to parse without error and then raise an
``AttributeError`` from ``to_ical()``.

See https://github.com/collective/icalendar/issues/1633
)ÚdateÚdatetimeÚ	timedeltaÚtimezoneN)ÚEventÚFreeBusy)ÚvPeriodéÍ  ©Útzinfoc                óL   € V P                   pRVP                  4       9   g   Q hR# )zNThe calendar serializes the dates as datetimes at midnight instead of raising.s2   RDATE;VALUE=PERIOD:19970101T000000/19970102T000000N)Úissue_1633_rdate_with_datesÚto_ical©Ú	calendarsÚcalendars   & Ú^/home/ralf/ical-fahrzeuge/venv/lib/python3.14/site-packages/icalendar/tests/test_issue_1633.pyÚ(test_calendar_from_the_issue_round_tripsr      s$   € à×4Ñ4€HØ@ÀH×DTÑDTÓDVÔVÐVÒVó    c                óp   € V P                   P                  R4      ^ ,          pVP                  . 8X  g   Q hR# )z>The value is understood, so the event is not marked as broken.ÚVEVENTN)r   ÚwalkÚerrors)r   Úevents   & r   Útest_no_error_is_recordedr      s/   € à×1Ñ1×6Ñ6°xÓ@ÀÕC€EØ�<‰<˜2ÔÐÒr   ú19970101/19970102ú19970101/P1D©Údaysú19970101T180000/19970102c                ó@   € \         P                  ! V 4      V8X  g   Q hR# )zDParsing returns datetimes, so the value matches what is written out.N)r   Ú	from_ical©ÚicalÚexpecteds   &&r   Útest_from_ical_converts_datesr%       s   € ô ×Ò˜TÓ" hÔ.Ð.Ò.r   ó   19970101T000000/19970102T000000ó   19970101T000000/P1Dc                ón   € \        \         P                  ! V 4      4      P                  4       V8X  g   Q hR# )zJDate-only halves are written out as datetimes, valid values are untouched.N)r   r!   r   r"   s   &&r   Útest_to_icalr)   0   s+   € ô ”7×$Ò$ TÓ*Ó+×3Ñ3Ó5¸ÔAÐAÒAr   c                óÎ   € \         P                  ! V4      pV^ ,          P                  f   Q hV^,          P                  f   Q h\        V4      P                  4       V8X  g   Q hR# )zuA date next to an aware datetime cannot stay naive.

The two halves could not be subtracted to compute the duration.
N)r   r!   r   r   )Útzpr#   r$   Úperiods   &&& r   Ú:test_a_converted_date_takes_the_timezone_of_the_other_halfr-   ?   s[   € ô ×Ò˜tÓ$€FØ�!�9×ÑÒ'Ð'Ð'Ø�!�9×ÑÒ'Ð'Ð'Ü�6‹?×"Ñ"Ó$¨Ô0Ð0Ò0r   c                óÌ   € V P                  \        R^^^4      R4      p\        V\        R^^4      34      P                  w  r#VP                  4       \        RR7      8X  g   Q hR# )z½The end is in summer, so it takes the summer offset of the timezone.

A pytz timezone carries one offset per period of its history, so the
offset of the start cannot simply be copied over.
r	   úAmerica/New_York©ÚhoursNéüÿÿÿ©Úlocalizer   r   r   ÚdtÚ	utcoffsetr   )r+   ÚstartÚ_startÚends   &   r   Ú8test_a_borrowed_timezone_uses_the_offset_of_its_own_dater:   Q   sY   € ð �L‰Lœ $¨¨1¨bÓ1Ð3EÓF€EÜ˜5¤$ t¨Q°Ó"2Ð3Ó4×7Ñ7�K€FØ�=‰=‹?œi¨bÔ1Ô1Ð1Ò1r   c                óÌ   € V P                  \        R^^^4      R4      p\        \        R^^4      V34      P                  w  r#VP                  4       \        RR7      8X  g   Q hR# )z@The start date takes the summer offset of the other half's zone.r	   r/   r0   Nr2   r3   )r+   r9   r7   Ú_ends   &   r   Ú/test_a_converted_start_borrows_a_named_timezoner=   \   sX   € à
�,‰,”x  a¨¨BÓ/Ð1CÓ
D€CÜœ4  a¨Ó+¨SÐ1Ó2×5Ñ5�K€EØ�?‰?Ó¤	°Ô 3Ô3Ð3Ò3r   c                óœ   € \        \        R^^4      \        R^^^\        P                  R7      34      pVP                  4       R8X  g   Q hR# )z@The timezone comes from the value, not from the active provider.r	   r
   ó!   19970101T000000Z/19970102T070000ZN)r   r   r   r   Úutcr   )r+   r,   s   & r   Ú.test_a_timezone_that_the_provider_does_not_userA   c   sA   € ä”d˜4  AÓ&¬°°q¸!¸QÄxÇ|Á|Ô(TÐUÓV€FØ�>‰>ÓÐCÔCÐCÒCr   c                óP   € \         P                  ! R4      w  rV\        8X  g   Q hR# )z9Converting the start does not move it to another instant.ú19970101/19970102T070000ZN)r   r!   ÚUTC_MIDNIGHT)r+   r7   r<   s   &  r   Ú'test_the_start_keeps_its_moment_in_timerE   i   s#   € ä×#Ò#Ð$?Ó@�K€EØ”LÔ Ð Ò r   c                óL   € V P                   pRVP                  4       9   g   Q hR# )zEFREEBUSY is a period too, in a component that does not ignore errors.s(   FREEBUSY:19970101T000000/19970102T000000N)Úissue_1633_freebusy_with_datesr   r   s   & r   Útest_freebusy_round_tripsrH   o   s$   € à×7Ñ7€HØ6¸(×:JÑ:JÓ:LÔLÐLÒLr   s   19970101T000000/19970102T070000c                óF   € \        V 4      P                  4       V8X  g   Q hR# )zDPassing a date is a mistake that is understood rather than rejected.N)r   r   ©r,   r$   s   &&r   Ú%test_a_period_can_be_built_from_datesrK   u   s   € ô �6‹?×"Ñ"Ó$¨Ô0Ð0Ò0r   c            	     óž   € \        4       p V P                  R\        R^^4      \        R^^4      3.4       RV P                  4       9   g   Q hR# )z,``add`` builds the period through vDDDLists.ÚRDATEr	   r&   N)r   Úaddr   r   )r   s    r   Útest_dates_added_to_a_componentrO   …   sE   € ä‹G€EØ	‡I�Iˆgœ˜d A qÓ)¬4°°a¸Ó+;Ð<Ð=Ô>Ø-°·±³Ô@Ð@Ò@r   c            	     óž   € \        4       p V P                  R\        R^^4      \        R^^4      3.4       RV P                  4       9   g   Q hR# )z1``add`` builds the period through vPeriod itself.ÚFREEBUSYr	   r&   N)r   rN   r   r   )Úfreebusys    r   Útest_dates_added_to_a_freebusyrS   Œ   sH   € ä‹z€HØ‡L�L�œt D¨!¨QÓ/´°d¸A¸qÓ1AÐBÐCÔDØ-°×1AÑ1AÓ1CÔCÐCÒCr   c            
     ó|  € \        4       p V P                  R\        R^^4      \        R^^4      3\        R^^^4      \        R^^4      3.4       V P	                  4       pRV9   g   Q h\         P
                  ! V4      pVR,          P                  ^ ,          P                  ^ ,          \        R^^4      8X  g   Q hR# )z@A date-only period next to a normal one survives the list split.rM   r	   s?   19970101T000000/19970102T000000,19970705T120000/19970706T000000N)r   rN   r   r   r   r!   Údtsr5   )r   r#   Úparseds      r   Ú.test_a_comma_separated_period_list_round_tripsrW   “   s®   € ä‹G€EØ	‡I�IØä�$˜˜1Óœt D¨!¨QÓ/Ð0Ü�d˜A˜q "Ó%¤x°°a¸Ó';Ð<ð	
ôð �=‰=‹?€DØMÐQUÔUÐUÐUÜ�_Š_˜TÓ"€FØ�'�?×Ñ˜qÕ!×$Ñ$ QÕ'¬8°D¸!¸QÓ+?Ô?Ð?Ò?r   c                 ó†   € \        \        R^^4      \        R^^4      34      p V P                  \        ^R7      8X  g   Q hR# )zEThe duration is available, where it used to be impossible to compute.r	   r   N)r   r   Údurationr   )r,   s    r   Ú7test_the_duration_is_computed_from_the_converted_valuesrZ   £   s:   € ä”d˜4  AÓ&¬¨T°1°aÓ(8Ð9Ó:€FØ�?‰?œi¨QÔ/Ô/Ð/Ò/r   c                óx  € VP                   pVP                  R4      ^ ,          pVR,          P                  ^ ,          P                  w  rEVP	                  RR7      \        R^^4      8X  g   Q hVP	                  RR7      \        R^^4      8X  g   Q hVP                  f   Q hRVP                  4       9   g   Q hR# )z:This form already converted before the fix and still does.r   rM   Nr
   r	   sH   RDATE;TZID=America/New_York;VALUE=PERIOD:19970101T000000/19970102T000000)Ú$issue_1633_rdate_with_dates_and_tzidr   rU   r5   Úreplacer   r   r   )r+   r   r   r   r7   r9   s   &&    r   Ú&test_a_period_with_a_tzid_is_unchangedr^   ©   s²   € à×=Ñ=€HØ�M‰M˜(Ó# AÕ&€EØ�w•×#Ñ# AÕ&×)Ñ)�J€EØ�=‰= ˆ=Ó%¬°$¸¸1Ó)=Ô=Ð=Ð=Ø�;‰;˜dˆ;Ó#¤x°°a¸Ó';Ô;Ð;Ð;Ø�<‰<Ò#Ð#Ð#ð	+Ø.6×.>Ñ.>Ó.@ô	Aðò	Ar   c                 ó´   € \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! R4       RRR4       R#   + '       g   i     R# ; i)z-Conversion does not make broken values parse.zExpected period format©Úmatchz19970101/not-a-dateN©ÚpytestÚraisesÚ
ValueErrorr   r!   © r   r   Ú'test_an_invalid_period_is_still_invalidrg   ·   s3   € ä	�Š”zÐ)A×	BÖ	BÜ×ÒÐ/Ô0÷ 
C×	B×	BÒ	Bús   ¥AÁA	c                 óÆ   € \         P                  ! \        RR7      ;_uu_ 4        \        \        P                  ! R4      4       RRR4       R#   + '       g   i     R# ; i)a  Midnight is the whole of the reading, the end is not stretched to the day.

``19970102T120000Z/19970102`` asks for an end that midnight puts before
the start, so the period is invalid. Reading the end as the end of that
day would invent a duration the calendar never stated.
z#Start time is greater than end timer`   z19970102T120000Z/19970102Nrb   rf   r   r   Ú-test_an_end_date_before_the_start_is_rejectedri   ½   s:   € ô 
�Š”zÐ)N×	OÖ	OÜ”×!Ò!Ð"=Ó>Ô?÷ 
P×	O×	OÒ	Oús   ¥ AÁA 	r"   ))r   r&   )r   r'   )r   s   19970101T180000/19970102T000000)z!19970101T180000Z/19970102T070000Zs!   19970101T180000Z/19970102T070000Z)z19970101T180000Z/PT5H30Ms   19970101T180000Z/PT5H30M)rC   r?   )z19970101T180000Z/19970102s!   19970101T180000Z/19970102T000000ZrJ   )!Ú__doc__r   r   r   r   rc   Ú	icalendarr   r   Úicalendar.propr   r@   rD   r   r   ÚmarkÚparametrizer%   r)   r-   r:   r=   rA   rE   rH   rK   rO   rS   rW   rZ   r^   rg   ri   rf   r   r   Ú<module>ro      sî  ðñ÷ 9Ó 8ã ç %Ý "á˜˜a ¨8¯<©<Ô8€òWòð ‡�×ÑØà	™x¨¨a°Ó3±X¸dÀAÀqÓ5IÐJÐKØ	™( 4¨¨AÓ.±	¸qÔ0AÐBÐCà&Ù�d˜A˜q "Ó%¡x°°a¸Ó';Ð<ð	
ðó
ñ/ó
ð/ð
 ‡�×ÑØòó	ñBó	ðBð
 ‡�×ÑØàKØKðóñ1óð1ò2ò4òDò!òMð ‡�×ÑØá
ˆt�Q˜Ó
™D  q¨!Ó,Ð	-Ð/QÐRÙ
ˆt�Q˜Ó
™I¨1Ô-Ð	.Ð0FÐGá�$˜˜1Ó™x¨¨a°°AÓ6Ð7Ø.ð	
ðó
ñ1ó
ð1ò
AòDò@ò 0òò1ô@r   