Business Hour
A listing
has many business hours. The day
in business_hours
object could be overlapped because it could have multiple sessions in a day. The business_hour
object has the following attributes:
- business_hour.id
- business_hour.day
- business_hour.day_name
- business_hour.abbr_day_name
- business_hour.open
- business_hour.closed
- business_hour.full_day?
- business_hour.open?
- business_hour.closed?
- business_hour.created_at
- business_hour.updated_at
business_hour.day
Returns the weekday from [0..6], where 0 is Sunday and 6 is Saturday.
business_hour.day_name
Returns the localized weekday’s long name.
business_hour.abbr_day_name
Returns the localized weekday’s short name.
business_hour.open
Returns the open hour/minute. Use the date filter to format the hour.
business_hour.closed
Returns the closed hour/minute. Use the date filter to format the hour.
business_hour.open?
Returns true if it is opening.
business_hour.closed?
Returns true if it is closed.
business_hour.full_day?
Returns true if it is opening 24 hours.