Birthdate¶
- class telegram.Birthdate(day, month, year=None, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObject
This object represents a user’s birthday.
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their
day
, andmonth
are equal.Added in version 21.1.
- Parameters:
- to_date(year=None)[source]¶
Return the birthdate as a datetime object.
Changed in version NEXT.VERSION: Now returns a
datetime.date
object instead of adatetime.datetime
object, as was originally intended.