To start off, I know that the day of week in javascript starts at 0, Sunday = 0, Saturday = 6.
However, there is something simple that I am missing here, but the following code always returns what I want, but 1 less.
This should return 6, but returns 5.
var string = "2014-06-21";
var temp = new Date(string);
alert(temp.getDay());
Anybody have any ideas whats going wrong, and how it may be fixed? Thanks.