a
    ø£Beç  ã                   @  s\   d dl mZ d dlmZ d dlmZ er8d dlmZmZ dddœdd	„Z	d
ddœdd„Z
dS )é    )Úannotations)ÚTYPE_CHECKING)ÚDurationFormattingException)ÚDateDurationÚDurationr   Úint)ÚdurationÚreturnc                 C  sÜ   | j jdko.| j jdko.| j jdko.| j jdk}| jjdkoR| jjdkoR| jjdk}| j jdko‚| j jdko‚| j jdko‚| j jdk}| jjdko¦| jjdko¦| jjdk}|s¾|s¾|rØ|rØdS n|sÌ|rØdS n|sØ|rØdS dS )Nr   éÿÿÿÿé   )	ÚdateÚyearsÚmonthsÚdaysÚweeksÚtimeÚhoursÚminutesÚseconds)r   Zis_date_zeroZis_time_zeroZis_date_negativeZis_time_negative© r   úa/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/isoduration/formatter/checking.pyÚcheck_global_sign   sD    
ÿ
þ
ü
ÿ
ý
ÿ
þ
ü
ÿ
ýr   r   ÚNone)Údate_durationr	   c                 C  s$   | j r | js| js| jr tdƒ‚d S )Nz2Weeks are incompatible with other date designators)r   r   r   r   r   )r   r   r   r   Úvalidate_date_duration1   s
    ÿr   N)Ú
__future__r   Útypingr   Z isoduration.formatter.exceptionsr   Zisoduration.typesr   r   r   r   r   r   r   r   Ú<module>   s   &