�
<��g + � �L � d Z ddlmZ ddlmZmZ d� Zd� Z G d� d� � ZdS ) z�
This module defines a Duration class.
The class Duration allows to define durations in years and months and can be
used as limited replacement for timedelta objects.
� )� timedelta)�ROUND_FLOOR�Decimalc � � | |z
||z
}}||z � t � � }|||z z
}||z
}t |� � |fS )z-
A divmod function with boundaries.
)�to_integralr �int)�val�low�high�a�b�div�mods �`/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/isodate/duration.py�fquotmodr sT � � ��9�d�S�j�q�A��q�5�
�
�k�
*�
*�C�
�c�A�g�+�C� �3�J�C��s�8�8�S�=�� c �X � |dv rdS |dv rdS | dz dk s| dz dk r| dz dk rd S d
S )zO
Determines the number of days of a specific month in a specific year.
)� � � � � �
� � )� � � � � i� r �d r � � � )�year�months r �max_days_in_monthr'