GooglePlaces Framework Reference

  • GMSOpeningHours stores and manages the opening hours information for a GMSPlace.

  • It provides access to the weekly opening and closing periods using the periods property, which contains an array of GMSPeriod objects.

  • Localized daily opening hours are available through the weekdayText property, presented as an array of strings.

  • The hoursType property indicates the type of opening hours using the GMSPlaceHoursType enum.

  • specialDays stores an array of GMSPlaceSpecialDay objects representing exceptions or variations in opening hours for the next seven days.

GMSOpeningHours

@interface GMSOpeningHours : NSObject

A class to handle storing and accessing opening hours information for GMSPlace.

  • Contains all GMSPeriods of open and close events for the week.

    Note: Multiple periods can be associated with a day (eg. Monday 7am - Monday 2pm, Monday 5pm - Monday 10pm).

       Periods may also span multiple days (eg Friday 7pm - Saturday 2am).
    

    Declaration

    Swift

    var periods: [GMSPeriod]? { get }

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSArray<GMSPeriod *> *periods;
  • Contains localized strings of the daily opening hours for the week.

    Note: The order of the text depends on the language and may begin on Monday or Sunday. Do not use the GMSDayOfWeek enum to index into the array.

    Declaration

    Swift

    var weekdayText: [String]? { get }

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSArray<NSString *> *weekdayText;
  • Returns the GMSPlaceHoursType of the opening hours.

    Declaration

    Swift

    var hoursType: GMSPlaceHoursType { get }

    Objective-C

    @property (nonatomic, readonly) GMSPlaceHoursType hoursType;
  • Returns a list of GMSPlaceSpecialDay entries, corresponding to the next seven days which may have opening hours that differ from the normal operating hours.

    Declaration

    Swift

    var specialDays: [GMSPlaceSpecialDay]? { get }

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSArray<GMSPlaceSpecialDay *> *specialDays;