Thank you very much
Post
Replies
Boosts
Views
Activity
Thank you very much for your help.
It is true that formatting the date and then converting it to string prints the right date, however I cannot compare dates anymore if I convert them to strings.
Because in my project I am trying to compare dates and not just integers.
Thank you very much for your time.
If the time is 03:00
I expect it to print "Sat, 11 Sep 2021 03:00:00 +0000", but it actually prints "Sat, 11 Sep 2021 01:00:00 +0000"
let date = Calendar.current.dateComponents(in: .current, from: Date()).date!
print(date)
Even if I do this it gives me the wrong date
Why?
Can you please provide me an example?
And what if I wanted to use if Date() > Date() + 86400 for example, is it formatted?
Thank You!
I want to be able to initialize it like this
@AppStorage("date") var date = Date()
But in this case
@AppStorage("date") var date = Date().rawValue, date isn't a Date, it's a Double
So if I try to bound it in a DatePicker it won't work
Thank you.
Is there a better way to save Date in @AppStorage?
But I already use this delete function in my deleteFromHealthKit
The problem is not the onTapGesture (also the onTapGesture is a placeholder), the problem is that valor[I] has fewer elements than valoriAsseX, I want if values [I] doesn't exist it becomes 0. Don't look at the onTapGesture, it's not a problem for now
Sorry for the English.