Skip to content

greeting(atHour:)

pokryfka edited this page Oct 1, 2020 · 4 revisions

greeting(atHour:)

Returns an appropriate greeting message at specified time of the day.

public func greeting(atHour hour: Int? = nil) throws -> Greeting

Parameters

  • hour: hour, 0-23

Throws

may throw GreetingError.invalidHour if the hour is not valid

Returns

greeting message

Clone this wiki locally