I have a javascript file i'm trying to use and the dates are not working out. Sorry if this a duplicate question. FYI - I'm not well versed in JS yet so please be patient!
To get current date I did this
var today = new Date()
var month = today.getMonth()+1;
var day = today.getDate();
var year = today.getFullYear();
var currentdate = month + "/" + day + "/" + year;
Now when I run this if statement it is telling me currentdate > week3
is true. What am I missing here?
var week3 = "04/17/2016";
var nl = "<br>";
if(currentdate > week3) {
document.write(week3.strike() + " " + week3info.strike() + nl); }
else {
document.write(week3 + week3info + nl); }