Friendly Date Ranges Error

On the Friendly Date Ranges Javascript algorithm, the tests require a response that does not match the rules of the algorithm as required:

(1) if the date range ends in less than a year from when it begins, do not display the ending year.
(2) if the date range begins in the current year and ends within one year, the year should not be displayed at the beginning of the friendly range.
(3) If the range ends in the same month that it begins, do not display the ending year or month.

If you look at the tests, there is an inconsistency. Test 2 should require the response ["December 1st, 2016","February 3rd"] and Test 2 should require ["March 1st","May 5th"] since the current year is no longer 2016.

1 Like