var day1 = new Date("2014-07-01");
Is it 30th June? What hour?
YYYY-MM-YY is the standard ISO date-format but apparently JS doesn't like the hyphens and we should use slashes '/' or one of the other JS-acceptable formats:
The point is, I would rather it fail than give an incorrect date. Is there some logic behind this behaviour (decision?)?
This post has been edited by andrewsw: 26 July 2014 - 07:56 AM