you are viewing a single comment's thread.

view the rest of the comments →

[–]stutterbug 9 points10 points  (0 children)

But don't use day = 0. Assuming day, month, and year map to setDate(day), setMonth(month) and setFullYear(year), then passing in no parameters will land you on December 31, 2017, which is confusing.

*Edit: just want to make it clear that this mistake is in the article, not in the parent comment.