Birthdate¶
- class telegram.Birthdate(day, month, year=None, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObjectThis 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
day, andmonthare equal.Available In
Added in version 21.1.
- Parameters:
- to_date(year=None)[source]¶
Return the birthdate as a date object.
Changed in version 21.2: Now returns a
datetime.dateobject instead of adatetime.datetimeobject, as was originally intended.