Initializer

init(_:)

Creates an instance that displays a localized time interval.

Declaration 宣言

init(_ interval: DateInterval)

Parameters パラメータ

interval

The date interval to display

Discussion 議論


Text(DateInterval(start: event.startDate, duration: event.duration))

Example output: 9:30AM - 3:30PM

See Also 参照

Creating a Text View for a Date