Javascript Date.UTC() function is off by a month?

The month is zero-based for JavaScript.

Days and years are one-based.

Go figure.

UPDATE

The reason this is so, from the creator of JavaScript, is

JS had to “look like Java” only less so, be Java’s dumb kid brother or boy-hostage sidekick. Plus, I had to be done in ten days or something worse than JS would have happened.

http://www.jwz.org/blog/2010/10/every-day-i-learn-something-new-and-stupid/#comment-1021

Leave a Comment