NaiveDate icon indicating copy to clipboard operation
NaiveDate copied to clipboard

Fix custom to fully support Codable protocol when using SwiftData

Open t-p-dev opened this issue 1 year ago • 3 comments

Fixes certain crashes when using NaiveDate/Time with SwiftData.

t-p-dev avatar Jul 30 '24 14:07 t-p-dev

Hi @kean and @liamnichols! Any chance of getting this merged in? This fixes some intermittent crashes we encountered when persisting NaiveDate objects with SwiftData. 🙏

moneill avatar Aug 10 '24 20:08 moneill

Hey, sure, let me look into it. Do you what's the root cause of the crash?

kean avatar Aug 10 '24 21:08 kean

Is this really needed? Wouldn’t it make more sense to make the NaiveDate RawRepresentable and also encode and decode it in string format 2017-12-30? I think that may be the best readable approach, even though it would be breaking.

lvalenta avatar Feb 16 '25 17:02 lvalenta