So, I use this to try to get the day to today. This works fine in Chrome, but IE thinks about it the day before. My current system date is 05/05/2014 10:14 (PST).
var todaysDate = new Date();
var maxDate = new Date(Date.UTC(todaysDate.getFullYear(),todaysDate.getMonth(),todaysDate.getDate()-1));
It is worth noting that both IE and Chrome return a value of 9 for the next.
console.log(todaysDate.getDate());
So, if today = 05/05/2014 (PST)
Chrome gets 05/05/2014
IE gets 05/05/2014
What's happening? Why does IE interpret this differently in Chrome?
source
share