It seems that there was a overlook by all of us (except for Matt.C) regarding the need to convert YY into YYYY - storing a year as two digits is considered very bad practice.
If we assume that all dates are in this century:
var dateString = "12/31/16";
var [month, day, year] = dateString.split("/"); // utilizing a new method
year = "20" + year; // if necessary
The above code should be converted to numbers using parseInt
An older and more compatible approach:
var dateString = "12/31/16",
parts = dateString.split("/"),
month = +parts[0],
day = +parts[1],
year = parseInt("20" + parts[2]); // remove "20" if not needed
Take notice how moment.js also faces issues with 2 digit years.
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release.