L i JdZddlZddlmZddlmZddlmZGddeZ y)zCThis module contains an object that represents a Telegram Birthday.N)Optional)TelegramObject)JSONDictc zeZdZdZdZ d dddededeedeeffd Zd deed e jfd Z xZ S) Birthdatea 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. )daymonthyearN api_kwargsrr r r ct||||_||_||_|j|jf|_|j y)Nr )super__init__rr r _id_attrs_freeze)selfrr r r __class__s Y/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_birthdate.pyrzBirthdate.__init__3sP J/ #'  HH JJ  returnc|j | tdtj|xs |j|j|j S)aReturn 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 ValueErrordtmdater r)rr s rto_datezBirthdate.to_dateJsH 99 Z xx) 4::txx@@r)N) __name__ __module__ __qualname____doc__ __slots__intrrrrrr __classcell__)rs@rrrsp()I #  *.  sm  X& .AHSMASXXArr) rdatetimertypingrtelegram._telegramobjectrtelegram._utils.typesrrrrr(s'&J3*AAAAr