Showing current date and time in a Widget

I'm trying to go by the example of the documentation "Keeping a widget up to date" by showing the current time and date, and am using the example below. It throws an error at the let futureDate statement that says, "Cannot use instance member 'components' within property initializer; property initializers run before 'self' is available"

Here's the section of code that's in the EntryView. BTW, the Widget is called CPCWidget.

Code Block struct CPCWidgetEntryView : View {
    var entry: Provider.Entry
  
  let components = DateComponents(minute: 11, second: 14)
  let futureDate = Calendar.current.date(byAdding: components, to: Date())!
  
  var body: some View {
      
    VStack(alignment: .center, spacing: 0) {
        
      Text(futureDate, style: .relative)
          .font(.largeTitle)
        
        Text(entry.date, style: .relative)
          .font(.custom("Times New Roman", size: 20))
        
        
      }
      
   
        
  }


Howdy,

Does the error go away if you change the code to be:
Code Block swift
var entry: Provider.Entry     
let futureDate = Calendar.current.date(byAdding: DateComponents(minute: 11, second: 14), to: Date())!

?
Yes it did. Thanks.
Showing current date and time in a Widget
 
 
Q