
    Yi                     N    S r SSKJr  SSKJr  SSKJr  SSKJr   " S S\5      r	g)	zCThis module contains an object that represents a Telegram Birthday.    )date)Optional)TelegramObject)JSONDictc                   z   ^  \ rS rSrSrSr SSS.S\S\S\\   S	\\   4U 4S
 jjjjr	SS\\   S\
4S jjrSrU =r$ )	Birthdate   aN  
This object describes the birthdate of a user.

Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`day`, and :attr:`month` are equal.

.. versionadded:: 21.1

Args:
    day (:obj:`int`): Day of the user's birth; 1-31.
    month (:obj:`int`): Month of the user's birth; 1-12.
    year (:obj:`int`, optional): Year of the user's birth.

Attributes:
    day (:obj:`int`): Day of the user's birth; 1-31.
    month (:obj:`int`): Month of the user's birth; 1-12.
    year (:obj:`int`): Optional. Year of the user's birth.

)daymonthyearN
api_kwargsr
   r   r   r   c                   > [         TU ]  US9  Xl        X l        X0l        U R                  U R                  4U l        U R                  5         g )Nr   )super__init__r
   r   r   	_id_attrs_freeze)selfr
   r   r   r   	__class__s        >/app/.venv/lib/python3.13/site-packages/telegram/_birthdate.pyr   Birthdate.__init__2   sJ     	J/ 
#'	 HHJJ

 	    returnc                     U R                   c  Uc  [        S5      e[        U=(       d    U R                   U R                  U R                  5      $ )ao  Return the birthdate as a date object.

.. versionchanged:: 21.2
   Now returns a :obj:`datetime.date` object instead of a :obj:`datetime.datetime` object,
   as was originally intended.

Args:
    year (:obj:`int`, optional): The year to use. Required, if the :attr:`year` was not
        present.

Returns:
    :obj:`datetime.date`: The birthdate as a date object.
zHThe `year` argument is required if the `year` attribute was not present.)r   
ValueErrorr   r   r
   )r   r   s     r   to_dateBirthdate.to_dateI   sD     99Z  D%DIItzz488<<r   )r   r
   r   r   )N)__name__
__module____qualname____firstlineno____doc__	__slots__intr   r   r   r   r   __static_attributes____classcell__)r   s   @r   r   r      ss    ( )I #	 *.  sm	 X& .=HSM =T = =r   r   N)
r"   datetimer   typingr   telegram._telegramobjectr   telegram._utils.typesr   r    r   r   <module>r,      s%   & J   3 *A= A=r   