Trying out a #swiftui feature that dynamically updates a relative time, in this case the poll expiration. You can watch the seconds tick by.
@fedicat Are you using this?
https://developer.apple.com/documentation/swiftui/text/init(_:style:)
@dandylyons yup, via the Text .relative style
https://books.nilcoalescing.com/swiftui-fundamentals/Text-and-localization/text-formatting
Edited 12d ago
@fedicat Oh wow. I've been wanting this for a long time. I didn't know that the Text.DateStyle could be string interpolated.
@dandylyons yeah, I was wondering how well it behaved with localization but the whole string is still localized as before
Text("poll.expires \(expires, style: .relative)")