TimeOfWeek

public abstract class TimeOfWeek implements Parcelable


Represents the opening or closing details for a Period.

Summary

Nested types

public abstract class TimeOfWeek.Builder

Builder for TimeOfWeek.

Public constructors

Public methods

static TimeOfWeek.Builder
builder(DayOfWeek day, LocalTime localTime)

Returns a TimeOfWeek.Builder initialized with the specified DayOfWeek and LocalTime.

abstract @Nullable LocalDate

Returns the LocalDate of the opening or close details.

abstract DayOfWeek

Returns the day of the week.

abstract LocalTime

Returns the time in 24 hour format, for example "1730", or "0000"

abstract boolean

Returns whether or not the opening or close details were truncated due to the seven day window, where the window starts at midnight of the day of the request, and ends at 11:59 pm six days later.

static TimeOfWeek
newInstance(DayOfWeek day, LocalTime localTime)

Returns an instance of TimeOfWeek.

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

TimeOfWeek

public TimeOfWeek()

Public methods

builder

public static TimeOfWeek.Builder builder(DayOfWeek day, LocalTime localTime)

Returns a TimeOfWeek.Builder initialized with the specified DayOfWeek and LocalTime.

getDate

public abstract @Nullable LocalDate getDate()

Returns the LocalDate of the opening or close details.

Only set in getCurrentOpeningHours&getSecondaryOpeningHours, and returns null in getOpeningHours.

getDay

public abstract DayOfWeek getDay()

Returns the day of the week.

getTime

public abstract LocalTime getTime()

Returns the time in 24 hour format, for example "1730", or "0000"

isTruncated

public abstract boolean isTruncated()

Returns whether or not the opening or close details were truncated due to the seven day window, where the window starts at midnight of the day of the request, and ends at 11:59 pm six days later.

Returns true if the open or close times for this period extends past this seven day window.

Will only be true in getCurrentOpeningHours&getSecondaryOpeningHours contexts.

newInstance

public static TimeOfWeek newInstance(DayOfWeek day, LocalTime localTime)

Returns an instance of TimeOfWeek.

date&truncated will be set to their default values, null& false, respectively. Use builder if date&truncated values need to be set.