WidgetKit Timer Field

I am creating a widget that includes a countdown to the next period of the day using a

Code Block swift
Text(entry.endDate, .timer)

I would like to modify the text so that it can simplify the time to the minutes and can be read as

5 min

Is it possible to modify the format of the date with the timer textfield for the widget?



Answered by Systems Engineer in 614564022
At this time you can only use the DateStyles laid out in https://developer.apple.com/documentation/swiftui/text/init(_:style:). Though I'd recommend filing a feedback if you are finding you need different date and time styles which are not supported.
Furthermore, if this is possible, can the text be modified such that it reads

1 hr 52 min


At this time you can only use the DateStyles laid out in https://developer.apple.com/documentation/swiftui/text/init(_:style:). Though I'd recommend filing a feedback if you are finding you need different date and time styles which are not supported.
I also require this ability.

Were you able to get it to work?

Thanks!
WidgetKit Timer Field
 
 
Q