Date in Swift printed is wrong

Hello

In my previous post I asked:

https://developer.apple.com/forums/thread/689720

(Read my previous post before continuing, please)

My question now is, if I compare Dates between each other will they be formatted or not, and how would I fix this?

Thank You

let date = Calendar.current.dateComponents(in: .current, from: Date()).date!

print(date) 

Even if I do this it gives me the wrong date

Why?

have you tried typing this in your browers search bar: "swift comparing dates". Did you get any responses?

Date in Swift printed is wrong
 
 
Q