CreateAPI / NaiveDate

Naive date and time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwiftUI `Text.init(_ date: NaiveDate, style: Text.DateStyle)` utility

robmaceachern opened this issue · comments

Thanks for the helpful library. I discovered it as part of Create API and it's wonderful!

I was wondering if you'd be interested in adding a SwiftUI Text.init(_ date: NaiveDate, style: Text.DateStyle) utility, in the same style as Text.init(_ date: Date, style: Text.DateStyle).

I think it'd be helpful (I was reaching for it today) but I'm not sure if it'd be a fit as part of this package.

Yes, NaiveDate has some convenience localizable strings formatting. I don't mind adding it. PRs are welcome.

I implemented it here: #6 – however, we can only make Text.init(_ date: NaiveDate, format: NaiveDate.FormatStyle). Looking forward for the feedback.