BusinessOpeningHoursInterval¶
- class telegram.BusinessOpeningHoursInterval(opening_minute, closing_minute, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObjectThis object describes an interval of time during which a business is open.
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their
opening_minuteandclosing_minuteare equal.Available In
Added in version 21.1.
Examples
A day has (24 * 60 =) 1440 minutes, a week has (7 * 1440 =) 10080 minutes. Starting the minute’s sequence from Monday, example values of
opening_minute,closing_minutewill map to the following day times:- Monday - 8am to 8:30pm:
opening_minute = 4808 * 60closing_minute = 123020 * 60 + 30
- Tuesday - 24 hours:
opening_minute = 144024 * 60closing_minute = 28792 * 24 * 60 - 1
- Sunday - 12am - 11:58pm:
opening_minute = 86406 * 24 * 60closing_minute = 100787 * 24 * 60 - 2
- Parameters:
opening_minute (
int) – The minute’s sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60.closing_minute (
int) – The minute’s sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60
- opening_minute[source]¶
The minute’s sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60.
- Type:
int
- closing_minute[source]¶
The minute’s sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60
- Type:
int
- property closing_time[source]¶
Convenience attribute. A
tupleparsed fromclosing_minute. It contains the weekday, hour and minute in the same ranges asdatetime.datetime.weekday,datetime.datetime.houranddatetime.datetime.minute- Return type:
tuple[
int,int,int]
- property opening_time[source]¶
Convenience attribute. A
tupleparsed fromopening_minute. It contains the weekday, hour and minute in the same ranges asdatetime.datetime.weekday,datetime.datetime.houranddatetime.datetime.minute- Return type:
tuple[
int,int,int]