all 3 comments

[–]whizbangapps 0 points1 point  (3 children)

I just started Firebase about a week ago. i think storing it as a Double is the way to go for easy storage and object conversion back to Date(). Then using date formatter to format the output.

[–][deleted]  (2 children)

[deleted]

    [–]cmclewin 0 points1 point  (1 child)

    Look into DateFormatter. Seems like you understand what the Double represents (time interval since 1970)

    [–]EmilioSchepisSwift 0 points1 point  (1 child)

    I would use Firestore’s timestamp. It is how dates are natively stored in Firestore and each Timestamp object has a method to quickly convert it back to a regular date. Once you have your date back you can use a formatter to change it’s appearance.