this really sounds like a simple question but I had no luck searching. what does the +d in
+d
function addMonths(d, n, keepTime) { if (+d) {
It is a unary "+" operator which yields a numeric expression. It would be the same as d*1, I believe.
d*1