The event card shows a short label with the day of the week and the start time. After a recent change, the behavior began to diverge from the requirements: in some cases the text does not change after updating the input data, and in others it is shown in the wrong locale.
EventBadgeView must show the label for the current event.startAt.event.localeIdentifier.event with the same id, but with different startAt or localeIdentifier, the label must update.EventDateFormatting.format(event:) must be used for formatting.EventBadgeView with the event:
id = "meetup"startAt = 2024-03-10 18:30:00 +0000localeIdentifier = "en_US"id, but:
startAt = 2024-03-11 09:15:00 +0000localeIdentifier = "fr_FR"startAt changes, the label must be recalculated even if the event id has not changed.localeIdentifier changes, the label must use the new locale, not the previous one.event passed to the view.Swift 6EventBadgeModel is isolated with @MainActorFoundation and SwiftUIDate values, and the device time zone is not overridden in the testUse line comments to explain the problem, its impact, the fix and how to test it.