OpeningHours

public struct OpeningHours : Codable, Hashable

Undocumented

  • Time zone in which the opening hours are defined

    Declaration

    Swift

    public let timeZone: TimeZone
  • Undocumented

    Declaration

    Swift

    public let days: [Day]
  • Declaration

    Swift

    public init(from decoder: Decoder) throws
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws
  • Day

    Opening hours on a particular day of the week (with a special case for public holidays).

    See more

    Declaration

    Swift

    public struct Day : Codable, Hashable
  • Checks if opening hour specify that the provided that is open.

    Warning

    This does not cover public holidays. If date is on a public holiday, the day of the week will be used.

    Declaration

    Swift

    public func isOpen(at date: Date) -> Bool

    Parameters

    date

    Date to check

    Return Value

    Whether open on provided date