Friendly Date Ranges Official Solution Question

Hi guys,

I have a question about the official solution for the Friendly Date Ranges algorithm. The test cases seem to want you to distinguish between whether the start year is the current year we are actually in and not. To do this I had to create a current year variable and then add a few extra if statements, which aren’t in the official answer (

Does anyone know how the official answer deals with this issue? I can’t see how…


I don’t want to spell out too much here, but check out the functions monthDiff and dayDiff in the official solution.