In the Booking up for Beauty exercise, one task involves implementing the description
function to return a string version of an appointment date.
In my solution, I’ve first tried to interpolate appointmentDate
in the output string (see iteration 1). That failed with a strange subtle difference in output:
Expected: Equals "You have an appointment on 3/29/2019 3:00:00 PM."
Actual: "You have an appointment on 3/29/2019 3:00:00PM."
I then tried to use appointmentDate.ToString("G")
(see iteration 3), but that failed with the same message.
Finally, I specified a custom format string directly (appointmentDate.ToString("M/d/yyyy h:mm:ss tt")
- see iteration 4) and the tests passed.
What’s weird is that locally, all of those iterations pass all tests. Furthermore, the output difference is very subtle. I also noticed that lots of community solutions are marked as failed (see for example this one), although I don’t know if it’s because of this.
Is it possible that the test runner does not output the exact same date/time format when using the default format in the test runner?