Type Property 型プロパティ

relative

A style displaying a date as relative to now.

Declaration 宣言

static let relative: Text.DateStyle

Discussion 議論


Text(event.startDate, style: .relative)

Example output: 2 hours, 23 minutes 1 year, 1 month

See Also 参照

Getting Text Date Styles