google.maps.places.PlaceOpeningHours interface
Defines information about the opening hours of a Place.
places
Methods
isOpen([date])
Parameters:
- date: Date optional
Return Value: boolean optional
Check whether the place is open now (when no date is passed), or at the given date. If this place does not have PlaceResult.utc_offset_minutes or PlaceOpeningHours.periods then undefined is returned (PlaceOpeningHours.periods is only available via PlacesService.getDetails).
Properties
Notice: open_now is deprecated as of November 2019 and will be turned off in November 2020. Use the PlaceOpeningHours.isOpen function from a PlacesService.getDetails result instead.
Type: boolean optional
Whether the Place is open at the current time.
Type: Array<PlaceOpeningHoursPeriod> optional
Opening periods covering for each day of the week, starting from Sunday, in chronological order. Days in which the Place is not open are not included. Only available with PlacesService.getDetails.
Type: Array optional
An array of seven strings representing the formatted opening hours for each day of the week. The Places Service will format and localize the opening hours appropriately for the current language. The ordering of the elements in this array depends on the language. Some languages start the week on Monday while others start on Sunday. Only available with PlacesService.getDetails. Other calls may return an empty array.