I\'m writing a unit test to check that my conversion from a date to string and back is successful.
I convert it to a string via:
func convertDateToString
The problem there is that Date is stored as a FloatingPoint value (timeIntervalSinceReferenceDate). There is fractional seconds being discarded there when converting your Date to String and back to Date. Take a look at post.
Date
FloatingPoint
String