google-maps-documentation

PlaceOpeningHours interface

google.maps.places.PlaceOpeningHours interface

Defines information about the opening hours of a Place.

Library

places

Methods
isOpen
isOpen([date])
Parameters: 
  • dateDate 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
open_now
Type:  boolean optional
Whether the Place is open at the current time.
periods
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.
weekday_text
Type:  Array<string> 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.