Friendly Date Ranges: Correct Output but Tests Failed

Friendly Date Ranges: Correct Output but Tests Failed
0

#1

The solution that I have for the Friendly Date Ranges algorithm produces the correct output for all of the tests. However, makeFriendlyDates([“2016-12-01”, “2017-02-03”]) and makeFriendlyDates([“2016-12-01”, “2018-02-03”]) tell me that I failed their tests despite having the correct output. Here is a link to the Pastebin with my solution:

[SPOILER ALERT]

http://pastebin.com/HBCwTa89


#2

The dates you return seem to be one day behind.

makeFriendlyDates(["2017-03-01", "2017-05-05"]) should return
["March 1st, 2017","May 5th"]
but your function returns
["Febraury 28th, 2017","May 4th"].

You also misspelled February.


#3

Thanks, the misspelling was the only thing wrong with my code for it to pass.