node.js - Javascript date parse error? -


this question has answer here:

  let date = new date("2017-09-12t12:00:00");   console.log(date.getutcmonth()); 

here expecting log 09 month it's logging 08. year, day , hour , minute gets parsed correctly though. what's going on here? how can extract 09 above date string?

the getutcmonth() zero-based value — 0 january.

for more info: https://developer.mozilla.org/en-us/docs/web/javascript/reference/global_objects/date/getutcmonth


Comments

Popular posts from this blog

javascript - WinJS appendTextAsync producing scheduler errors -

minify - Minimizing css files -

Sockets with kotlin -