OpeningHours

public abstract class OpeningHours implements Parcelable


Represents information on when a Place will be open during the week.

Summary

Nested types

public abstract class OpeningHours.Builder

Builder for OpeningHours.

public enum OpeningHours.HoursType implements Parcelable

Identifies the type of secondary opening hours.

Public constructors

Public methods

static OpeningHours.Builder

Returns a Builder.

abstract @Nullable OpeningHours.HoursType

Returns the HoursType of the opening hours.

abstract List<Period>

Returns a list of Period objects that provide more detailed information that is equivalent to the data provided by getWeekdayText.

abstract List<SpecialDay>

Returns a list of up to seven SpecialDay entries, corresponding to the next seven days.

abstract List<String>

Returns a list of strings that represent opening and closing hours in human readable form.

Inherited Constants

From android.os.Parcelable
static final int
static final int
static final int
static final int

Inherited methods

From android.os.Parcelable
abstract int
int
abstract void
writeToParcel(Parcel p, int p1)

Public constructors

OpeningHours

public OpeningHours()

Public methods

builder

public static OpeningHours.Builder builder()

Returns a Builder.

Any values not explicitly set, default to an empty List.

getHoursType

public abstract @Nullable OpeningHours.HoursType getHoursType()

Returns the HoursType of the opening hours.

Will return non-null values only in getSecondaryOpeningHours contexts.

getPeriods

public abstract List<PeriodgetPeriods()

Returns a list of Period objects that provide more detailed information that is equivalent to the data provided by getWeekdayText.

This list should not be modified.

getSpecialDays

public abstract List<SpecialDaygetSpecialDays()

Returns a list of up to seven SpecialDay entries, corresponding to the next seven days.

Entries will only be present for getCurrentOpeningHours&getSecondaryOpeningHours.

getWeekdayText

public abstract List<StringgetWeekdayText()

Returns a list of strings that represent opening and closing hours in human readable form. For example:

  • "Monday: 8:30 AM – 5:30 PM"
  • "Saturday: Closed"

This list should not be modified.