1017
xkcd #2867: DateTime
(imgs.xkcd.com)
A community for a webcomic of romance, sarcasm, math, and language.
In the example you gave, wouldn't the year be off by one when
param2.month
is 12?I was transcribing it from memory and that exact problem cost me like two hours when I was writing it the first time. Well spotted, now write me a unit test for that case.
Y'know, I legitimately said to myself "I bet they were writing that from memory and just forgot the edge case. I wonder if that was a problem when doing it originally?" before I wrote that comment. ๐ Time to get some Spock tests set up!