malcommac / SwiftDate

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

Buggy isRelative #757

Open zhiyao92 opened 4 years ago

zhiyao92 commented 4 years ago

Given that the time format is "2020-10-16T15:08:27.000Z" and the usage of self.toRelative(style: RelativeFormatter.defaultStyle(), locale: Locales.english)

Assuming that the time is now 6pm, in 6.1.0, it will correctly return 3 hours ago. But in 6.2.0, it now return in 6 hours.