Birthdate¶
- class telegram.Birthdate(day, month, year=None, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObject
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
day
, andmonth
are 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.date
object instead of adatetime.datetime
object, as was originally intended.