malcommac / SwiftDate

🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.
MIT License
7.61k stars 767 forks source link

RelativeFormatter languages and errors with iOS 16 #799

Closed wisepmlin closed 2 years ago

wisepmlin commented 2 years ago

/Users/****/Documents/StuDemo/swift/package/SwiftDate-master/Sources/SwiftDate/Formatters/RelativeFormatter/langs error project: Couldn't load project at: /Users/****/Documents/StuDemo/swift/package/SwiftDate-master/Sources/SwiftDate/Formatters/RelativeFormatter/langs

qaiserfreshbrain commented 2 years ago

any fix for this? i found the same while building for IOS 16.

malcommac commented 2 years ago

I'll remove the built-in RelativeFormatter replacing it with the RelativeDateTimeFormatter now available. The min SDK will become iOS 13+.

qaiserfreshbrain commented 2 years ago

@malcommac not sure what you mean but could we have a fix for IOS 16 somehow?

IOS 16 is about to be released soon and we are using your pod in our app and need to release app update.

malcommac commented 2 years ago

Yes, it will be compatible with iOS 16, but it could take a few days.

qaiserfreshbrain commented 2 years ago

Ok i ll be waiting for an update then. Thanks!

malcommac commented 2 years ago

released 👍

cowgp commented 1 year ago

@malcommac Do you have any tips on the new (in 7.0.0) toRelative to replicate as close as possible to the previous .twitterStyle()? - I am guessing:

someDate.toRelative(since: nil, dateTimeStyle: .numeric, unitsStyle: .abbreviated)

...but that wont produce the same super succinct 6m or 1h that twitterStyle() used to. it's more verbose 6 min. ago.

Guessing there is not solution and that if we want the fixes in 7.0.0 than we need to update our designs to allow more room for the relative times, but I wanted to clarify if you can please.

IgorMuzyka commented 1 year ago

@cowgp did you found a solution for this? I'm in the midst of fixing build errors with Xcode 14.2rc and actually need to recreate something close to what it was, also the default style. Help would be appreciated, wanted to check in tests but the code for relative is commented out in 7.0.0.